W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2005

[whatwg] Image maps: should we drop <a coords="">?

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Tue, 12 Apr 2005 12:02:33 +1000
Message-ID: <425B2C39.7010405@lachy.id.au>
Ian Hickson wrote:
> Client-side with <a> (doesn't work in WinIE6, works in Moz, Opera):
> 
>    <img usemap="#foo"> (or <object usemap="#foo"></object>)
>    <map id="foo">
>     ...
>     <a coords="..." ...></a>
>    </map>

I've never seen that used at all either, most likely because it doesn't 
work in IE and because every single tutorial I've ever seen only teaches 
area.

> While it is definitely a better design than <area>,it isn't a
> substantially better design,

How so?  Although <a> might have a slightly less presentational name 
than <area>, the semantics of both are identical when used for an image map.

> I believe we can take the opportunity to prune the spec without ill effect.

I don't see any harm in either keeping it or removing, but there's not 
much point to having it either.

> Anyone want us to keep <a coords="">?

No.

One request though.  When this section of the spec gets written, can you 
provide an example with less presentational abuse than HTML 4 does. 
Using it just to provide a navigational toolbar is innappropriate, 
because the same can be, and has been, achieved with CSS.

Image maps should be used to describe the structure of an image and to 
indicate significant areas within it.  The simplest and most often used 
non-presentational example I've seen is a world map, but perhaps 
something like highlighting sections of a photo, for which there are 
close-up pictures available.

eg.
<img src="/images/park" usemap="park" alt="...">
<map id="park">
   <area coords="..." shape="rect" href="swings" alt="Swing Set"
         title="Close up photo of the swing set">
   <area coords="..." shape="poly" href="tree" alt="Old Willow Tree"
         title="Close up photo of the old, gnarled willow tree">
</map>

-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Received on Monday, 11 April 2005 19:02:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:22 UTC