W3C home > Mailing lists > Public > public-html@w3.org > September 2007

Image controls and form submission

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 14 Sep 2007 01:19:50 -0500
Message-ID: <46EA2806.2070008@mit.edu>
To: "public-html@w3.org" <public-html@w3.org>

Looking at Web Forms 2, the text covering submission of image controls says:

   Image buttons, during this step, must be handled as if they were
   two controls, one with the control's name with .x appended, whose
   value is the x coordinate selected by the user, and the other with
   the control's name with .y appended, whose value is the y coordinate
   selected by the user.

This leaves the following questions open:

1)  What if the user doesn't explicitly select any coordinates?  For
     example, the user triggers the control by tabbing to the image
     and hitting enter.
2)  What if the image has been replaced by inline alt text?

In terms of UA behavior, Gecko currently always sends "x=&y=" for case 2 (no 
matter how the control is triggered) and sends "x=0&y=0" for case 1 if we're not 
in case 2.  This seems to cause problems in some cases, however: see 

As far as I can tell, Opera always sends "x=0&y=0" for case 1 and doesn't do 
anything special in case 2: if you click somewhere in the alt text, the 
coordinates of the click with respect to the alt text are sent to the server. 
That seems to defeat the purpose of having coordinates in the submission in the 
first place (which is to figure out where in the image the user clicked).

What do other UAs do?  What sort of behavior do we want?  In Gecko, I'm somewhat 
tempted to make case 2 always do the same thing as case 1: send "x=0&y=0".  That 
should fix the compat problem we've run into, while still not selecting any 
"real" pixel in the image... maybe.

Received on Friday, 14 September 2007 06:20:04 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:21 UTC