Closed Bug 313818 Opened 19 years ago Closed 19 years ago

Image map does not work in application/xhtml+xml

Categories

(Core :: XML, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Michael_Landis, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051025 Firefox/1.6a1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051025 Firefox/1.6a1 Well-formed pages with image maps work when the page is interpreted as text/html, but when interpreted as application/xhtml+xml, the same code does not function as an image map. Minimal test case is at http://michael4css.info/examples/map/map.html and http://michael4css.info/examples/map/map.xhtml Reproducible: Always Steps to Reproduce: 1. Access http://michael4css.info/examples/map/map.html 2. Click the first link in the map, marked "XHTML link", which takes you to http://michael4css.info/examples/map/map.xhtml 3. Try to now click the second link in the map, marked "HTML link" Actual Results: The entire image map on the XHTML page appears to clickable (the cursor changes to a pointer, as over a link), but the image map and none of its links are clickable. Expected Results: The image map should behave as it does on the HTML page, where each area is treated as a link.
does <map id="map"> work?
It shouldn't -- unlike with the <a> tag, the spec says that the "name" attribute is expressly required in the <map> tag to identify it.[1] Michael [1] http://www.w3.org/TR/html4/struct/objects.html#edef-MAP
See http://www.w3.org/TR/xhtml1/#h-4.10. If you want the same content to work as both HTML and XHTML, you need to include both id and name. ->invalid
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Or, more normatively than that informative section, see the Transitional DTD, which says that the id attribute is required for map elements, while name is not.
I stand corrected. Apologies for the noise! :)
*** Bug 342193 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.