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

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?

Thanks for your help...
Ian Hickson
"I take a Professor Bullett approach to my answers. There's a high
probability that they may be right."
  -- Dr Snow; Mechanics Lecturer at Bath University; 1999-03-04

Received on Wednesday, 3 November 1999 02:54:45 UTC