PF/XTech/HTML5/TextAlternativeProposal
Text Alternative Proposal (Collaborative March 4-6, 2009 version)
FINAL RESOLUTIONS
Composite Proposal / Resolutions
This version is a collaborative of previous related proposals.
General RESOLUTIONS
NOTING THAT:
- @alt is a very important accessibility attribute (it is supported by all browsers, most authoring tools and is the most well known accessibility technique among authors).
- Having @alt "required" in HTML 4.01 raised public awareness of Web accessibility in general.
- automatic validators can detect the presence/absence of @alt but in general can't certify the correctness of the text string.
RESOLUTION 1: We agree HTML5 should provide mechanism(s) for providing short text alternatives.
RESOLUTION 2: We agree HTML5 should provide mechanism(s) for providing long text alternatives.
RESOLUTION 3: We agree HTML5 should provide mechanisms to allow both short and long text alternatives at the same time.
RESOLUTION 4: We recommend continued inclusion of the "alt" attribute as a non-deprecated mechanism to provide short text alternatives.
RESOLUTION 5: That HTML5 state that "For guidance on accessibility requirements for text alternatives authors SHOULD consult WCAG 2.0." and that HTML should not provide any guidance that conflicts with WCAG.
RESOLUTIONS REGARDING Short alternatives
IMG
is only valid under any of the following conditions:alt
is present (empty or non-empty)aria-labelledby
is present (non-empty only)role="presentation"
- the
IMG
is located within aFIGURE
that has a non-emptyLEGEND
- That the proper use of @role="presentation" be taken from ARIA 1.0 and that an IMG without a @role attribute is assumed to be the equivalent of
<IMG @role="img">
(and would follow the rules in #1 above) - For cases in which it is appropriate for user agents to ignore the presence of the image (e.g., when they are used for decoration, formatting, or are invisible), one or both of the following may be used:
@role="presentation"
alt=""
(also see (4))
alt=""
WITHOUT an accompanyingrole="presentation"
triggers a non-critical validator warning recommending use ofrole="presentation"
(butalt=""
remains technically valid)- We suggest new mechanisms for short text alternatives (e.g.
labelledby
,LEGEND
) should be capable of handling structured content. Our primary concern is that short text alternatives be able to support inline text structure, such as abbreviations, language changes, emphasis, etc.
RELATED RECOMMENDATIONS TO WCAG
NOTE: The following recommendations are being passed on to WCAG working group to be developed into techniques. They are provided here for background and context.
- If (and only if) an image is broken up into pieces that are intended to be perceived as one image the text alternative for the _composite image_ can be for the first image with the other pieces marked as presentational. This does not apply to a series of pictures.
- To provide a short descriptor for a collection of images contained in a
FIGURE
,LEGEND
can be used to provide a short description of the varied images. If theLEGEND
is used for something other than a short description thenalt
orlabelledby
needs to be specified for each image.
RESOLUTIONS REGARDING Long text alternatives (that go beyond short text alternatives)
- Long text alternatives (e.g.
describedby
) (to supplement short text alternatives) are not required for validity (though they may be required by WCAG 2.0 for conformance for some types of non-text content). - Mechanism(s) for long text alternatives should be capable of handling structured content.
- Our primary concern with long text alternatives is that they be able to support block and inline text structure, such as abbreviations, language changes, emphasis, tables, headings, etc. However it is not necessarily limited to these and could include rich media types.
- Because we assume that
aria-describedby
will be supported by AT at least as well aslongdesc
when HTML5 goes to Rec- IF
- aria-describedby is incorporated in HTML5
- and describedby allows pointing to long text alternatives off of the page (by pointing to a link on the page)
- IF
- THEN
- we believe it is acceptable to make longdesc deprecated in HTML5.
END OF RECOMMENDATIONS
OLDER NOTES AND MEETING MINUTES
Meetings and Resolutions
February 4 Special WAI CG meeting on HTML alt
proposal: @alt is a very important accessibility attribute (it is supported by all browsers, most authoring tools and is the most well known accessibility technique among authors).
PROP: Having @alt "required" in HTML 4.01 raised public awareness of Web accessibility in general.
PROP: automatic validators can detect the presence/absence of @alt but in general can't certify the correctness of the text string.
We want HTML5 to provide mechanisms for providing text alternatives.
RESOLUTION: We agree all guidance on the the content of @alt, including any examples that are provided in HTML5 to be non-normitive and be provided in coordinations with the WAI PF WG.
February 12 Special WAI CG meeting on HTML alt
RESOLUTION: We agree HTML5 should provide mechanism(s) for providing short text alternatives.
RESOLUTION: We agree HTML5 should provide mechanism(s) for providing long text alternatives.
RESOLUTION: We agree HTML5 should provide mechanisms to provide both short andlong text alternatives at the same time.
RESOLUTION: We agree mechanism(s) for long text alternatives should be capable of handling structured content.
RESOLUTION: We suggest new mechanisms for short text alternatives should be capable of handling structured content ... Our primary concern with short text alternatives is that they be able to inline support text structure, such as abbreviations, language changes, emphasis, etc. ... Our primary concern with long text alternatives is that they be able to support block and inline text structure, such as abbreviations, language changes, emphasis, tables, headings, etc.
RESOLUTION: We recommend continued inclusion of the "alt" attribute as a non-deprecated mechanism to provide short text alternatives.
RESOLUTION: Because we believe aria-describedby will be supported by AT at least as well as longdesc when HTML5 goes to Rec, we believe it is acceptable to make longdesc obsolete in HTML5
March 4 Special WAI CG meeting on HTML alt
March 6 Special WAI CG meeting on HTML alt
Previous Related Proposals
- Explicitly Noted Alternatives Via Multiple Methods - John Foliot, April 27, 2008.
- Requiring the alt Attribute in HTML5 from Gez Lemon, January 31, 2009.
- Providing Human-Parseable and Machine-Processible Terse Textual Alternatives and Markers for Static Images from GregoryRosmaita, February 20, 2009.
- Alternate Proposal from GreggV, February 20, 2009.
- Terse Descriptor Requirements and Normative Advice for HTML5, version 2 from GregoryRosmaita, March 4, 2008.
- Terse Descriptor Requirements and Normative Advice for HTML5, versions 2 & 2.5 from GregoryRosmaita, March 4, 2008.
- (others?)
EITHER:
- A. That
alt=""
is valid ONLY whenrole="presentation"
. - B. That
alt=""
is valid ONLY whenrole="presentation"
. AnIMG
without arole
attribute is the equivalent of<IMG aria-role="image">
and REQUIRES the use ofalt
,labelledby
, and/orLEGEND
for validity. For guidance as to what constitutes a valid text alternative for the purpose of disability access consult WCAG 2.0. - C. That
alt=""
WITHOUT an accompanyingrole="presentation"
MUST trigger a non-critical validity warning (but is still valid). - D. That
alt=""
is valid ONLY whenrole="presentation"
(orrole="presentation"
would be appropriate ifrole
is not used).alt=""
with any role besides"presentation"
MUST trigger a validity error. - E. Other ideas?
Sample Code
Three Stages of A Butterfly's Life Example
Each of the images in the 3 stages of a butterfly's life REQUIRE alt
text and/or labelledby
to provide them with unique and appropriate short descriptions, just as each form control in a FIELDSET
has its own LABEL
defined for it, with the value of the LEGEND
element providing a CAPTION-like function for the FIELDSET
, so too does LEGEND
provide a means of declaratively marking explicit bindings of groups of related
objects, as in:
<FIGURE aria-labelledby="l1"> <LEGEND id="l1">The Three Stages of a Butterfly's Life Cycle</LEGEND> <IMG alt="Stage 1: The larval stage." src="butterfly1.svg" longdesc="butterfly1.html"> <IMG alt="Stage 2: The pupal stage." src="butterfly2.svg" longdesc="butterfly2.html"> <IMG alt="Stage 3: The adult stage." src="butterfly3.svg" longdesc="butterfly3.html"> </FIGURE>
the LEGEND
applies to all three images as a collection of related objects, available, for example, in a screen reader situation, either through a verbosity setting or via an extended query, such as MagicKey+TAB reads the alt text of the individual graphic which has focus, MagicKey+TAB pressed twice rapidly (or with a moderator key) provides the user with the LEGEND
which describes, tersely, the group to which the individual image belongs, so that the user can be made aware of:
a) each individual image's short alternative text;
b) the grouping to which the image belongs (if it is one of a series presented in a FIGURE) or any other modality-specific content contained in HTML5's media-specific elements, including AUDIO, VIDEO, OBJECT and CANVAS;
Related Resources
- A role Attribute for HTML5
- A Unified Approach to HTML5's Media Specific Elements
- Proposed Solutions in the HTML Wiki
- Omitting Text Alternatives on <img> - HTML Wiki
- PF XTech HTML5 Issues & Requirements Index
- XTech Wiki: Cross-Working Group Issues Index
- Protocols & Formats (member start page) - HTML Wiki
BONEYARD
1. That HTML5 validity REQUIRE short text alternatives for non-text items that are not presentational and that these be provided using one of the HTML5 specified methods: (alt
, labelledby
, or legend
).
- For example
- For images;
alt
attribute oraria-labelledby
can be used. - For an image that is a child of a figure;
alt
attribute,aria-labelledby
, orlegend
can be used (would be valid). - (this would apply to other non-text content as well)
- For images;
- That the proper use of
role="presentation"
be taken from ARIA 1.0. - An
IMG
without arole
attribute is the equivalent of<IMG aria-role="image">
and REQUIRES the use ofalt
,labelledby
, and/orLEGEND
for validity. - The following applies to
alt=""
and validity.- That for content where
role="presentation"
is appropriate eitheralt=""
orrole="presentation"
or both can be used.- That
alt=""
WITHOUT an accompanyingrole="presentation"
would trigger a non-critical warning recommending use ofrole="presentation"
(but is still valid).
- That
- That for content where