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

Re: Dropping <input usemap="">

From: Philip Taylor <philip@zaynar.demon.co.uk>
Date: Thu, 16 Aug 2007 12:19:09 +0100
Message-ID: <46C432AD.3070103@zaynar.demon.co.uk>
To: Robert Burns <rob@robburns.com>
CC: public-html <public-html@w3.org>

Robert Burns wrote:
>>> It doesn't submit form data. We have an <input type-'image'> that 
>>> doesn't submit form data (unless the map is nohrefed or something 
>>> like that). That doesn't sound like it works as intended to me.
>>
>> It does submit form data, when you click on a part that's not already 
>> covered by the client-side image map.
> 
> I see I was wrong there, again based on what Lachlan had said. It does 
> work in FireFox and Opera as the HTML 4.01 recommendation specifies.  
> And that means that it works when @href is not set on the |area| 
> elements (its not just those area not covered by |area|). That is the 
> feature we're discussing here. It cannot be done without the @usemap 
> attribute.

In Firefox/Opera, when you have an <area> with no href, clicking on that 
area does nothing at all (unlike when you click on somewhere not covered 
by any <area>). If you wanted it to transmit the click through the area 
onto the image button behind it, then that's no good for accessibility 
(users without a pointing device couldn't click through the area, and 
activating an <area> with the keyboard wouldn't be able to do anything 
sensible since the UA would have no idea what was sensible in that 
case), and it would be incompatible with the current implementations in 
Firefox/Opera. As far as I can tell, the only advantage is that users 
with pointing devices could get title tooltip texts on different areas.

>> Pure client-side image maps without any server-side scripting are 
>> already handled by <img usemap>, so <input> doesn't benefit from 
>> supporting them too. Without server-side scripting, I can't see how 
>> you would use <form> or <input> at all.
> 
> An image map could be used client-side to narrow a user's choices. 
> Imagine an interface to select the timezone from an image of a world 
> map. In a visual browser, as the   mouse hovers over each timezone, the 
> area could be highlighted. Also a hover view (what some call a tooltip) 
> could be displayed indicating the timezone such as "central standard 
> time", or "atlantic daylight time". In an aural browser the user would 
> pick from the different area elements by hearing the @alt text and the 
> advisory @title text. Once the user selected a timezone, a javascript 
> could set the UTC offset in another <input type='hidden'>. None of this 
> requires server-side support. The server need not even know that an 
> image or an image map is involved in this interface. The page could be 
> served from a different server than the one the form is submitted to.

If you're not using a server side, there's no point in using server-side 
image maps, so <input usemap> is irrelevant - just use client-side image 
maps.

<input id="gmtoffset">
<map name="m">
<area shape="rect" coords="0,0,20,100" href="#" title="GMT-0100" 
alt="GMT-1" onclick="document.getElementById('gmtoffset').value = -1; 
return false">
<area shape="rect" coords="20,0,40,100" href="#" title="GMT+0000" 
alt="GMT" onclick="document.getElementById('gmtoffset').value = 0; 
return false">
<area shape="rect" coords="40,0,60,100" href="#" title="GMT+0100" 
alt="GMT+1" onclick="document.getElementById('gmtoffset').value = 1; 
return false">
</map>
<a><img src="worldmap.jp2" usemap="#m"></a>

If you do have a server side, you can avoid the reliance on scripting by 
doing <area ... href="selecttimezone.cgi?-0100" ...>.

-- 
Philip Taylor
philip@zaynar.demon.co.uk
Received on Thursday, 16 August 2007 11:19:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:48 UTC