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 16743 - button with image and text generates error
Summary: button with image and text generates error
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-15 16:48 UTC by Kurt Roeckx
Modified: 2015-08-23 07:07 UTC (History)
1 user (show)

See Also:


Attachments

Description Kurt Roeckx 2012-04-15 16:48:52 UTC
Hi,

I have a
<button><img src=foo>text</button>

The validator gives me this error:
An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

I think the "text" part there make the meaning of the image in the button clear, and shouldn't need an extra alt tag.


Kurt
Comment 1 Michael[tm] Smith 2012-04-23 20:23:20 UTC
The validator behavior conforms to the HTML5 spec. If you believe the spec should allow <button><img src=foo>text</button>, please consider filing a bug against the spec itself: http://w3.org/brief/MjA2