Add an incomplete attribute for the <img> element
Editor: Laura Carlson (firstname.lastname@example.org)
Date: April 27, 2010. Last updated August 9, 2012.
- ISSUE-206: Should HTML5 have a meta generator exception to the alt requirement?
- Bug 9212: Change the Generator Mechanism for img from Document Level to Element Level
- Bug 9213: HTML5 Lacks a Way to Programmatically-Determine Missing Text Alternatives
incomplete attribute for the image element.
- 1 Add an incomplete attribute for the <img> element
- 1.1 Summary
- 1.2 Rationale
- 1.3 Details
- 1.4 Impact
- 1.5 References
This change proposal not only addresses the image gallery (Flickr) use case by specifying an incomplete attribute, it also helps provide a practical method of detection, handling, and repair of incomplete text alternatives. This proposal:
- Allows an <img> element without alt text be honestly labeled for it is: incomplete.
- Provides a machine checkable mechanism to locate incomplete alt text/enable tools to quickly discern where "incomplete" has been used.
- Addresses multiple constituencies needs in the appropriate order.
Providing Structural Integrity and Actuate Terminology
Equitable presentation of web content for all users, including people with disabilities, require different modes of presentation. For web content to be independent of presentation, both the
src attribute and the
alt attribute are necessary for images.
- Omit the
srcattribute, and users who can process images have no content;
- Omit text alternatives, and users who cannot process images or who have image loading disabled have no content.
For a person who can process images, if there is no
src element, then no content is rendered, and therefore it is a document error. For users who cannot process images or who have image loading disabled, if no content is rendered, then there is likewise a document error; without
alt content, the
img element is not representing anything to that user. It is inequitable for a document to represent something to a user who can process images but not to a user who cannot process images or who has image loading disabled.
Without both a
src attribute and a text alternative the
img element is incomplete, and structurally defective as further discussed in in a previous change proposal on conformance checking.
Minting a new
incomplete attribute would allow an <img> element without alt text to be honestly identified and labeled for it is: incomplete, lacking substance.
A Teachable Moment
Enabling automatic validators by default to programmatically detect the presence or absence of text alternatives 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. 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. For details and examples in the wild, please consult:
- A Teachable Moment Use Case
- Pedagogical Examples in the Wild of W3C Validator Used for Detecting Missing alt
As the W3C Validator documentation states, "Validating Web documents is an important step which can dramatically help improving and ensuring their quality...". It provides a teachable moment, to whit: "Validation helps teach good practices". Additional information is available at HTML5 Should Help Facilitate Accessibility Awareness and Education.
relaxing attribute would by default suppress errors and educational opportunities. It would strip the validator of its default educative benefits. If content developers are not aware that a problem (missing alternative text) exists, they are not notified about it, nor do they have the opportunity to rectify specific instances of missing alternative text. They are therefore deprived of the opportunity to learn about the general issue, and deprived of the opportunity to improve their content. Please consult the Harm of Hiding Errors From Authors use case for details.
relaxing attribute is detrimental because it reduces the odds of author finding and fixing errors in their documents that they otherwise would not be aware of (the fundamental purpose of the validator) -- because the proposed
relaxing attribute hides conformance requirements, many users of the validator would no longer be alerted to errors in their documents that they would otherwise be informed about and would fix. Validator users are not benefited when the validator fails to inform them about errors in their documents that violate document-conformance constraints in the specification.
Appropriately Giving End-User Requirements Precedence Over Authoring Tool Conformance
While there may indeed may be authors who irresponsibly choose to enter bogus alternative text, knowingly violating the intended use of alternative text as an accessibility accommodation, this is not a reason to codify their bad practices by removing validation alerts for missing alternative text for content authors who would prefer to do the right thing and provide alternative text for images. Nor is this assertion even evidence-backed.
The lines of reasoning in the relaxing proposal imply that considerations of authoring tool conformance should take precedence over end-user requirements for accessible web content. That is backward. Given that alternative text is essential to understanding graphical web content for some web users, the proposed justification for the omission of alternative text based on conformance convenience for authoring tools, and validation convenience for content authors, is an inadequate counter-consideration to the needs of end-users for accessible content.
3.2 Priority of Constituencies: In case of conflict, consider users over authors over implementors over specifiers over theoretical purity. In other words costs or difficulties to the user should be given more weight than costs to authors; which in turn should be given more weight than costs to implementors; which should be given more weight than costs to authors of the spec itself, which should be given more weight than those proposing changes for theoretical reasons alone. Of course, it is preferred to make things better for multiple constituencies at once.
This proposal tries to make things better for multiple constituencies in the right order. Not by default but though a vaildator option, engineers of large Web applications can suppress errors. For an example of how this could be accomplished please consult Audience Based Validator User Interface.
incomplete Attribute Can Help Improve the Web
incomplete attribute would make a useful addition for assistive technology to disambiguate between what is currently referred to in the spec as an image key part of the content but does not have an alt provided and the case where an alt is simply not provided which does not provide any information as to its importance. In this way AT can inform the user of the presence of the image "important image!" and attempt heuristics if desired.
incomplete attribute affords a practical means to mitigate damages after all else has failed, allowing for crowdsourcing or metadata repair of text alternatives. AT would be at liberty to apply a crowdsourced definition, to scour image metadata or or both, since the AT knows that the author didn't apply a text alternative, it can inform the user as to the potential deficiency in the located text(s).
Metadata repair possibilities exist with the addition of an
incomplete attribute. If an authoring tool prompts an author for a text alternative and the author explicitly refuses, a tool's auto-generated incomplete attribute could trigger a retrieval process such the one outlined in the post RDFPic, a w3c open source tool RDFPic and in the RDF and Photos W3C Note.
Possibilities for crowdsourcing exist with the addition of an "incomplete" attribute. It should be reasonably easy to maintain a hash of images with @incomplete and the obtain value(s) submitted for them. We would need a canonical URI (or in HTML5, an 'origin') for the document and an ID for the image, but if we had a service (either local or remote) that accepted the URI and its @alt value, then users of AT could associate the values as needed. The worst case is that nothing is returned. (The second-worst case is that it's a bogus value, but the owner of the document could manage submitted @alt content.) The pointer to where to send this information could be in a <link> element, and it could be a standard HTTP request, or a transaction using the HTML5 Database object. It could be hosted locally, or by a third party.
This idea would get around one of the biggest problems with around images: that we can see something is wrong with someone else's content, but can't do anything about it. With this method people who know what they're doing could directly impact the accessibility of another organization's content.
It also helps image gallery sites since the image creator or anyone who views the image could propose usable @alt with an extremely low-bandwidth solution.
In §4.8.1 "The img element," add an
incomplete boolean attribute to the
<img> element. Define the attribute like so:
incompleteattribute indicates by its presence that the
<img>element lacks an
<img>elements with an
incompleteattribute should have an
incompleteattribute MUST only be used by automated HTML generation software that offers no opportunity for authors to provide a text alternative. It MUST not be used by WYSIWYG or any other HTML editing software. Note: Software that does not provide authors with the ability to add a text alternative to an image is not considered an accessible HTML editing tool ATAG 2.0.
This attribute ONLY represents the presence of an image that is a key part of the content containing information not otherwise provided in the document.
In §18.104.22.168.12 "Guidance for markup generators," add the following paragraph after the paragraph which begins with "As a last resort...":
If a value for the
altattribute is not supplied by a user, generators should mark the
<img>element with the
In §22.214.171.124.13 "Guidance for conformance checkers," remove the bullet (which starts with "The document has a meta element..." and add the following paragraph:
If a conformance checker encounters an
<img>element with an
incompleteattribute specified, it should by default report it. However, it may supply an option to suppress such an error.
- We no longer imbue
<meta name=generator>with effects incompatible with its historical and deployed usage.
- We supply an option to enable engineers of large Web applications to catch markup errors that they can do something about, without bothering them about markup errors they can't do anything about.
- We enable authors to be made aware that they have not provided a text alternative giving them the opportunity to fix their error and produce a conforming document.
- We help users by providing a practical method of detection, handling, and repair of incomplete text alternatives.
- We uphold the structural integrity of <img> element.
- We enable automatic validators to programmatically detect occurrences of the presence or absence of text alternatives. Bug 9218.
- We facilitate accessibility awareness and education.
- We uphold the HTML section 3.2. "Priority of Constituencies" Design Principle.
Conformance Classes Changes
- This change alters the following conformance classes:
- Conforming documents,
- Conformance checkers, and
- Authoring tools and markup checkers.
Good Authoring Use Cases
Backwards compatibility is fundamental to HTML5. Like it or not, changing validator behavior that good authors and teachers have depended on for years to pinpoint missing alt would be a problem.
Teachable Moment Use Case
For the past 10 years Thelma has been teaching web design. One of the first lessons that she gives her students is to validate HTML with the W3C validator to be sure that it is error-free and that they have indeed examined each image. It makes a big impression on her students that text alternatives are mandatory not just for WCAG but for valid HTML as a structurally complete image element enables those who cannot process images or who have image loading disabled to obtain content. It also helps introduce the concept of accessibility. When accessibility is an integrated part of authoring good HTML, the outcome is more perceivable content for all. Her students fix errors. But they can't if they are not in formed about them.
Harm of Hiding Errors From Authors Use Case
Joe, an author is accustomed to take validator silence as a sign that the page is without errors. He assumes, from XHTML and HTML4 validation, that validation includes a check of every img element of the page. He is convinced of the usefulness of validation as an authoring tool, and regularly validates in order to check that his pages and templates conform to the basic @alt conformance that HTML validations is known to check. He is unaware that, within HTML5 he will receive no alt errors.
It has never occurred to him that the validator hides errors from him. The silence leads Joe to think that his pages get checked for @alt, whereas the truth they are not. Now he misses errors that he would have caught and fixed.
Finally - and ultimately - the silently silenced validator leads Joe's users - especially the AT users - to suffer because they increasingly get handed Web pages where easy fixable @alt conformance errors remains unfixed simply because the tool that Joe entrusted the task of reporting these errors, did - silently - not report them.
Meta Data References
- RDFPic: a tool to embed an RDF description of a picture into the picture itself. The source code and documentation is available, as is a ready-to-run jar file.
- PHOTO-RDF: Describing and Retrieving Photos using RDF and HTTP.
- Flickr photo info to RDF image description
- Image Description
- Metadata Working Group (MWG)
- International Press Telecommunications Council (IPTC)
- Exchangeable Image File (EXIF)
- Extensible Metadata Platform (XMP) - Adobe.
- The PHP JPEG Metadata Toolkit
- JPEG Metadata Format Specification and Usage Notes
- Image MetaData JPEG - Perl extension for showing/modifying JPEG (meta)data.
- PNG Metadata Format Specification
- Labeling Digital Photos
- Media metadata properties - Rob Burns.
- DOM method to return the EXIF metadata for an image as a JSON dictionary - T.V. Raman.
- @alt and the Flickr Defense - Matt May.
- Fix the Web
- Social Accessibility Project
- ObjectDescription - ObjectDescription is a service that lets anyone write a description for any non-textual object (such as an image) on the Web.
- WebVisum.com – crowdsourcing accessibility - Chris Heilmann.
- Crowdsourcing YouTube Video Captioning - Martin Kliehm.
- Crowd-sourced Twitter Captioning of Videos Brian Kelly.
- Understanding the readability of colored text by crowd-sourcing on the Web An experiment about the readability of colored text on a colored background conducted through crowd-sourcing on the Web.
- Web Accessibility 3.0: Learning From The Past, Planning For The Future - Brian Kelly and Liddy Nevile.