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 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: HP All
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
Depends on:
Reported: 2012-02-26 20:29 UTC by Leif Halvard Silli
Modified: 2017-11-08 11:53 UTC (History)
1 user (show)

See Also:


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: