Require alt. Correct Definition to Provide Equality. Replace Guidance for Conformance Checkers.
Editors: Laura Carlson (firstname.lastname@example.org)
Date: May 04, 2010. (Last Updated Novembet 28, 2010)
This HTML5 change proposal modifies the image element. It replaces the:
This change proposal helps resolve HTML ISSUE-31: missing-alt .
- 1 Require alt. Correct Definition to Provide Equality. Replace Guidance for Conformance Checkers.
- 1.1 Summary
- 1.2 Rationale
- 1.2.1 Simpler is Better
- 1.2.2 Structural Integrity of the Language
- 1.2.3 Upholding Standards and the Authoring Tool Quandary
- 1.2.4 Accessibility Awareness
- 1.2.5 Education - A Teachable Moment
- 1.2.6 PFWG WAI Review of the alt Attribute
- 1.2.7 Additional Rationale
- 1.2.8 Correcting the Definition to Provide Equality
- 1.3 Details
- 1.4 Impact
- 1.5 References
- 1.6 Related References
Simpler is Better
The alt attribute is the most successful accessibility attribute in any version of HTML. This is largely do to the simple message conveyed to authors: "All images require an alt attribute".
Conditional rules (if this, then that, but not when...) introduces complexity which would make:
- Learning how to write good text alternatives more complicated for authors.
- Teaching how to write good text alternatives more complicated for educators.
- Designing user-friendly ATAG compliant tools more complicated for tool makers.
Adding loopholes and/or more techniques for text alternatives is a complexity which may result in confused and lost authors. The more choices you give people, the harder it is for them to choose, and the more likelihood of them getting it wrong.
It will be difficult and costly for tools to implement the additional steps.
The best way to increase good text alternative usage is through simplicity and consistency: require alt.
Structural Integrity of the Language
Requiring alt helps ensure that images have complete structure. Complete structure requires both visual and textual content.
Upholding Standards and the Authoring Tool Quandary
Lowering standards to move away from a situation that explicitly requires the language of the web to be non-discriminatory, to one where the language of the web allows discrimination to be valid would be a step backward. Content in the src and alt attributes are of equal importance.
The web is the medium, HTML a language, and tools are tools. Because some developers or tool makers may not be willing to fully use the potential of the language and some tools may not be up to the task does not justify debasing the web's inclusive world-wide goals.
As a markup language, HTML5 should be concerned with upholding standards, rather than lowering integrity constraints to cater for poor tools, authors, or both.
The spec currently states: "Authoring tools and markup generators must generate conforming documents." 
This is a flawed rule as far as text alternatives are concerned. As Gez Lemon has stated ,
When an authoring tool doesn't have anything useful to put in for the alt text, the tool shouldn't put anything in. A good authoring tool will check for missing alt text and offer to assist the user in repairing the content. If an author is adamant they're not going to provide alt text, there is no requirement that says the authoring tool should provide it in place of the author. In fact, it's just the opposite, as the authoring tool could not possibly know the author's intent. In this scenario, the authoring tool should not include the alt attribute at all, and the resulting markup should be considered invalid. It should be considered invalid because it is inaccessible, and not perceivable by some people. If the tool allows alt text to be provided, then the tool would be considered compliant (on this particular issue), even though the resulting markup would not be compliant, as the user chose not to make the content compliant.
Enabling automatic validators to programmatically detect the presence or absence of text alternatives (as HTML4 did with alt) raises public awareness of Web accessibility in general. It is an undeniable advertisement that text alternatives are needed and a chance to educate the author about proper usage. More people use the W3C validator than read the specs. It has been said that the W3C HTML4 validator has done worlds more than the HTML4 specification for increasing the quality of HTML documents on the web .
Education - A Teachable Moment
Requiring the alt attribute aids in accessibility education . In other words, validators create a teachable moment. Indeed, the W3C validator is currently used for university classes as a valuable teaching and learning tool. For example, a first lesson in teaching good authoring practice is to have developers and students validate HTML on the W3C site to be sure that it is error-free and that they have indeed examined each image. It makes a big impression that text alternatives are mandatory not just for WCAG but for valid HTML as well. When accessibility is an integrated part of authoring good HTML, the outcome is more perceivable content.
People fix errors. Directly pointing authors who encounter a missing text alternative error to advice on how to fix it will offer an especially powerful learning method exactly when it is needed called Just-in-Time Training (JITT). Mike Smith is working on a pilot validator implementation for missing text alternative error reporting. As the accessibility task force recommendation stated, the "error text is expected to reference additional guidance on text alternatives in WCAG support materials".
PFWG WAI Review of the alt Attribute
The Web Accessibility Initiative's Protocols and Formats Working Group (WAI PFWG) reviewed the alt attribute issue  in 2008 and concluded,
Conclusion: barring the introduction of new, good reasons for a change, the failure of the HTML5 draft to make @alt on <img> an across-the-board requirement (even if sometimes it has the value of "") is a bug.
- Rationale: Generated mechanism
- Rationale: Private communication and email
- Rationale: title attribute
Correcting the Definition to Provide Equality
Content in the src and alt attributes are of equal importance. Vlad Alexander has pointed out the inequity of the current HTML5 img element definition in his article, Should HTML5 spec correct the img element definition? 
The HTML5 spec defines the <img> element as an element that "represents an image". The spec then defines alternative text (textual content) as "fallback content". What's wrong with this? These definitions suggest that the visual content (the image) is more important than the textual content. As a result, to many people, if the primary purpose of embedding an image is achieved, the secondary or fallback purpose (textual content) can be skipped or given cursory effort.
The principle behind this definition is already in practice in a publicly available HTML reference...
The <img> element's visual content and its textual content are equivalent in meaning and should therefore be of equal importance. How elements are defined in the specification influences tool vendors, educators and ultimately Web site creators, so that clearly defining the correct use of HTML elements can over time improve the use of HTML.
Replace the Definition of the Image Element:
An img element represents an image.
The image given by the src attribute is the embedded content, and the value of the alt attribute is the img element's fallback content.
With Suggested Definition of the Image Element:
The <img> element represents content that can be rendered visually (as an image) and textually. The src attribute provides visual content in the form of an image and the alt attribute provides textual content. The content in the src and alt attributes must convey equivalent meaning.
Replace the Current Guidance for Conformance Checkers Text:
A conformance checker must report the lack of an alt attribute as an error unless one of the conditions listed below applies:
- The title attribute is present and has a non-empty value (as described above).
- The img element is in a figure element that contains a figcaption element that contains content other than inter-element whitespace (as described above).
- The conformance checker has been configured to assume that the document is an e-mail or document intended for a specific person who is known to be able to view images.
- The document has a meta element with a name attribute whose value is an ASCII case-insensitive match for the string "generator". (This case does not represent a case where the document is conforming, only that the generator could not determine appropriate alternative text — validators are required to not show an error in this case to discourage markup generators from including bogus alternative text purely in an attempt to silence validators.)
With Suggested Guidance for Conformance Checkers Text:
A conformance checker must report the lack of an alt attribute on the <img> element as an error.
- Corrects the definition to provide equality. Bug 9098
- Declares resulting structure invalid, if an alt attribute is not detected.
- Upholds the structural integrity of the markup language.
- Raises accessibility awareness.
- Aids accessibility education.
- Reduces complexity.
- Enables automatic validators to easily programmatically detect occurrences of the presence or absence alt.
- Corrects the spec to disallow <img> to be valid with the email exception Bug 8646.
- Corrects the spec to disallow <img> to be valid with the title attribute.Bug 7362. Also Bug 9215 (WebCam), Bug 9216 (CAPTCHA).
- Corrects the spec to disallow <img> to be valid with the generator mechanism. Bug 9212
- Guidance for conformance checkers (HTML5 Version 20100624) 
- Definition of the imag element (HTML5 Version 20100624) 
- ISSUE-31 What to do when a reasonable text equivalent is unknown/unavailable? 
- Authoring tools and markup generators 
- HTML5 Alternative Text, and Authoring Tools - Gez Lemon 
- W3C HTML4 validator has done worlds more than the HTML4 specification for increasing the quality of HTML documents on the web. - Jonas Sicking 
- Why Validate? Point 2.d: Validation helps teach good practices .
- Re: Request for PFWG WAI review of Omitting alt Attribute for Critical Content, Al Gilman, PFWG Chair 
- Should HTML5 spec correct the img element definition? - Vlad Alexander. 
Detailed Three Year History of the Issue
A detailed three year history of the issue includes issue description, time line, proposed solutions, rationale - pros and cons, research, advice from WAI, use cases, policies/guidelines/law, and email threads:
- Short Text Alternatives on <img>
- Bug 9098: Correct the img element definition. Replace with suggested text.
- Bug 8716: Replace img Guidance for Conformance Checkers with Suggested Text for Short Text Alternatives
- Bug 8171: Implement the text alternatives proposal from WAI
- Bug 9217: "Remove the Paragraph-Section-Heading loophole for not providing a text alternative.
- Bug 9216: "Provide a CAPTCHA example that is in accord with WCAG 2 or Defer to "HTML5: Techniques for providing useful text alternatives"
- Bug 9215: "Provide a Webcam example that is in accord with WCAG 2 or Defer to 'HTML5: Techniques for providing useful text alternatives"
- Bug 9214: Allow role="presentation" on img
- Bug 9213: (Missing attribute) HTML5 Lacks a Way to Programmatically-Determine Missing Text Alternatives
- Bug 9212: Remove the "generator" option.
- Bug 8646: Private communication exception
- Bug 7362: Inclusion of the title as a case where the alt may be omitted is problematic
- Bug 6496: Allow <img aria-labelledby> to act as a text alternative