Bug 14638 - Image maps unusable when using XHTML 1.1
Summary: Image maps unusable when using XHTML 1.1
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 15323 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-17 06:13 PDT by Adam Read
Modified: 2007-09-30 01:16 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Read 2007-07-17 06:13:28 PDT
Image maps are not usable when writing valid XHTML 1.1.  In the img usemap attribute, the id of the map needs to be prefixed with a '#' if the image-map is to be useable.  For valid XHTML, the '#' shouldn't be there.

e.g.
Valid XHTML:
<map id="foo" ...>
...
<img usemap="foo" ...>

Invalid, but working XHTML:
<map id="foo" ...>
...
<img usemap="#foo" ...>

I've posted examples at:
http://phcrack.ca/webkit_bug/valid.xhtml
http://phcrack.ca/webkit_bug/invalid.xhtml
Comment 1 Adam Read 2007-07-17 06:15:45 PDT
(In reply to comment #0)
Didn't know the comments weren't html.

The XHTML is obviously:

Valid XHTML:
<map id="foo" ...>
...
<img usemap="foo" ...>

Invalid, but working XHTML:
<map id="foo" ...>
...
<img usemap="#foo" ...>
Comment 2 Alexey Proskuryakov 2007-08-12 01:13:54 PDT
We do not aim to fully implement XHTML 1.1 where it disagrees with XHTML 1.0 and HTML. In this particular case, XHTML 5 draft says that "the usemap attribute, if specified, must be a valid hashed ID reference to a map element" - so we treat this as an bug in the XHTML 1.1 spec.

Please note that Firefox 3 betas also no longer support non-hashed idrefs in usemap, so the map in <http://phcrack.ca/webkit_bug/valid.xhtml> doesn't work anymore.
Comment 3 Ian 'Hixie' Hickson 2007-08-12 11:56:14 PDT
Actually this bug isn't just WONTFIX, it's INVALID. The XHTML working group has agreed several times to change usemap from IDREF to be compatible with HTML4, but they just haven't done it yet. For a history describing this issue, see this blog entry:
   http://ln.hixie.ch/?start=1172653243&count=1
Comment 4 David Kilzer (:ddkilzer) 2007-08-12 12:07:06 PDT
Reopening to change status per Comment #3.

Comment 5 Mark Rowe (bdash) 2007-09-30 01:15:48 PDT
*** Bug 15323 has been marked as a duplicate of this bug. ***