Bugzilla – Bug 979
<a name=foo id=bar> should be reported as an error
Last modified: 2013-09-26 10:05:54 CEST
Minimal demo: <!doctype html><title> </title> <a name=foo id=bar>x</a> This currently causes only a warning about the name attribute (and the warning is somewhat misleading when it says “Consider putting an id attribute on the nearest container instead.”; this note should be suppressed when the element itself has an id attribute). It should additionally cause an error message, because HTML5 CR clause 11.1 says (and HTML 5.1 Nightly as of today hasn’t changed this): “If this [name] attribute is present and the element has an ID, then the attribute's value must be equal to the element's ID.” http://www.w3.org/TR/html5/obsolete.html#obsolete-but-conforming-features