Re: Implementation Query: <MAP> with mixed <AREA> <A> !?

On Wed, 3 Nov 1999, Ian Hickson wrote:

> On Tue, 26 Oct 1999, Dave Raggett wrote:
> >> When trying to implement client side image maps in Mozilla, we have
> >> hit a problem.
> >> 
> >> The following is valid XHTML:
> >> 
> >>    <p><img src="x" alt="text" usemap="#map" /></p>
> >>    <map id="map">
> >>       <p><a href="#a" shape="rect" coords="10,10,20,20">A</a></p>
> >>       <area href="#b" shape="rect" coords="30,30,40,40" alt="B"/>
> >>    </map>
> >> 
> >> But, assuming images are disabled or the UA does not support
> >> images, how should the above be rendered?
> >> 
> >> I need to know what the expected behaviour as we are currently
> >> trying to implement this in Mozilla.
> >> 
> >> With the content model of MAP in HTML4 this was not an issue, since
> >> in that case AREAs and other content could not be mixed in MAP
> >> elements. Previously, if the MAP contained only AREA elements then
> >> the AREA elements would be turned into a menu and would replace the
> >> IMG altogether, and if the MAP contained mix content then the IMG
> >> would be replaced by its alt text, made inert, and the MAP would be
> >> renderered inline where it appeared in the document.
> > 
> > The first element in the map element renders as a paragraph with a
> > hypertext link. The second should be rendered as a hypertext link,
> > as if the content of the map element were:
> > 
> >   <p><a href="#a">A</a></p>
> >   <a href="#b">B</a>
> 
> I'm assuming this is only when the IMG is broken -- when it is
> visible, we just ignore the AREA elements, right? (We have to for
> backwards compatability -- otherwise, image map texts will appear all
> over the shop for no apparent reason on millions of web pages.)
> 
> And also, what do we render in the place of the image? The alt text,
> or nothing? And do we make it a link? A link to what?

This is a design choice. I would advise giving users the chance to
follow the links specified in the area elements, perhaps by showing
a popup menu when mousing over or clicking on the icon for the
broken image. The icon should indicate this possibility in some way.
It would be great if the user preferences for the browser included
the option to automatically insert the text generated from the map
element and its contents, without user intervention.


Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
phone: +44 122 578 2984 (or 2521) +44 385 320 444 (gsm mobile)
World Wide Web Consortium (on assignment from HP Labs)

Received on Wednesday, 3 November 1999 07:53:12 UTC