This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27324 - html5 imagemap area attribute coordinates: scan seems not to terminate properly on final quote.
Summary: html5 imagemap area attribute coordinates: scan seems not to terminate proper...
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-14 11:28 UTC by Purodha Blissenbach
Modified: 2015-08-23 07:07 UTC (History)
1 user (show)

See Also:


Attachments
Imagemap validating as html4 but not html5. (1.24 KB, text/html)
2014-11-14 11:28 UTC, Purodha Blissenbach
Details
html4 version of the sample (validates) (1.37 KB, text/plain)
2014-11-14 11:29 UTC, Purodha Blissenbach
Details
imagemap validating as html5 - no whitespace in coords value. (1.23 KB, text/plain)
2014-11-14 20:15 UTC, Purodha Blissenbach
Details

Description Purodha Blissenbach 2014-11-14 11:28:05 UTC
Created attachment 1547 [details]
Imagemap validating as html4 but not html5.

The imagemap in the attached sample validates as html4 but not html5.

Validation Output: 2 Errors

Error Line 25, Column 62: Bad value 160,0 , 66,222 , 360,171 for attribute coords on element area: Expected a digit but saw instead.
						   href="https://de.wikipedia.org/wiki/Cheops-Pyramide">
Syntax of polyline:
...
Error Line 31, Column 72: Bad value 0,170, 366,366 for attribute coords on element area: Expected a minus sign or a digit but saw instead.
						   href="https://de.wikipedia.org/wiki/Kairo#Pyramiden_von_Gizeh">
Syntax of rectangle:
...
Comment 1 Purodha Blissenbach 2014-11-14 11:29:35 UTC
Created attachment 1548 [details]
html4 version of the sample (validates)
Comment 2 Purodha Blissenbach 2014-11-14 20:15:22 UTC
Created attachment 1549 [details]
imagemap validating as html5 - no whitespace in coords value.

Thanks to Kevin Wieland of uni-koeln.de: the html5 validator does strange things when the coords attribute contains spaces. Without them, imagemaps are accepted as valid, see 3rd attachment.

Hint: I use whitespace to group pairs of coordinates so as to make imagemaps more readable. Thus I prefer to be able to use them with html5 as well as with older html versions.
Comment 3 Michael[tm] Smith 2014-11-17 07:14:49 UTC
The validator conforms to the HTML5 spec here.

Note that the spec says, "The coords attribute must, if specified, contain a valid list of integers" http://www.w3.org/TR/html/embedded-content-0.html#attr-area-coords

and then it says "A valid list of integers is a number of valid integers separated by U+002C COMMA characters, with no other characters (e.g. no space characters)." http://www.w3.org/TR/html/infrastructure.html#valid-list-of-integers

So the spec makes it quite clear that spaces aren't allowed in the coords value.

If you believe the HTML spec should instead allow spaces in the coors value, the place to raise a bug is https://www.w3.org/Bugs/Public/enter_bug.cgi?product=WHATWG&component=HTML