Bug 16125 - Validation of image(s) that form(s) a link or button
Summary: Validation of image(s) that form(s) a link or button
Status: NEW
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL: http://dev.w3.org/html5/spec/the-img-...
Depends on:
Reported: 2012-02-26 20:29 UTC by Leif Halvard Silli
Modified: 2012-02-26 21:50 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Leif Halvard Silli 2012-02-26 20:29:33 UTC
Spec says:

]] When an a element that creates a hyperlink, or a button element, has
no textual content but contains one or more images, the alt attributes
must contain text that together convey the purpose of the link or

Therefore one would expect that the following examples would trigger errors:

  <a href=foo ><img src=bar alt=''" ></a>
  <a href=foo ><object data=bar type="image/gif"></object></a>
  <button type=button ><img src=bar alt="" ></button>
  <button type=button ><object data=bar type="image/gif" ></object></button>
But currently, as the validator considers the above examples as valid. Please fix.

See message to public-html/public-html-a11y: