This Wiki page is edited by participants of the WCAG Working Group. It does not necessarily represent consensus and it may have incorrect information or information that is not supported by other Working Group participants, WAI, or W3C. It may also have some very useful information.
Using aria-describedby to provide descriptions of images
From WCAG WG
- Surveyed by TF 25 June 2012
- Discussed by TF 25 June 2012
- Reopening to address Laura Carlson's comment, surveyed in Responses to Public Comments, ARIA Techniques and review of images section of WAI tutorials. August 20th 2013
- Discussed October 8 and this technique updated to adhere with response to Laura Carlson's comment LC-2848 and John Foliot's comment LC-2847. Will be confirmed on the November 26 survey.
Using ARIA Describedby to provide descriptions of images
User Agent Notes [To be published separately]
Updated by David MacDonald July 16, 2013
- Jaws V.11 and greater has complete support. IE10 JAWS 14. Speaks alt and then "press JAWS key + alt +r to hear descriptive text". IE 10 intermittent support, sometimes works, sometimes need to reload the page for JAWs to read it properly.
- ChromeVox V.1 and greater has complete support?
- VoiceOver V.3 and greater supports but replaces ALT text if both are present
- NVDA 2 reads ALT text if both are present but not Describedby unless it is alone
- Window Eyes as of V.7 ???.
As of this writing this technique applies to HTML technologies.
This technique relates to:
The objective of this technique is to provide descriptions of images when a short text alternative does not adequately convey the function or information provided in the object.
A feature of WAI-ARIA is the ability to associate descriptive text with a section, drawing, form element, picture, and so on using the
aria-describedby property. This is similar to the
longdesc attribute in that both are useful for providing additional information to help users understand complex images. Like
longdesc, descriptive text provided using
aria-describedby is separate from the short name provided using the
alt attribute in HTML. Unlike
aria-describedby cannot reference descriptions outside of the page containing the image. An advantage of providing long descriptions using content from the same page as the image is that the alternative is available to all, including sighted people who do not have assistive technology. It is worth noting that as of the time of writing (October 2013) some assistive technologies read
aria-describedby content immediately after an image's alt attribute information without user activation - whereas most implementations of
longdesc require the user to take explicit action to read the additional description.
aria-describedby can accept multiple ids to point to other regions of the page using a space separated list. It is also limited to ids for defining these sets.
The following example shows how
aria-describedby can be applied to an image to provide a long description, where that text description is on the same page as the image.
<img src="ladymacbeth.jpg" alt="Lady MacBeth" aria-describedby="p1"> <p id="p1">This painting dates back to 1730 and is oil on canvas. It was created by Jean-Guy Millome, and represents ...</p>
- ARIA-XX: Using aria-labelledby to provide labels for objects.
- ARIA-XX: Using aria-label to provide labels for objects.
- G92: Providing long description for non-text content that serves the same purpose and presents the same information
- H45: Using longdesc
- Examine each image element where a
aria-describedbyattribute is present.
- Examine whether the
aria-describedbyattribute programatically associates an element with its text description, via the
idattribute on the element where the text to be used as the description is found.
- Examine whether the combined text equivalent and associated text description accurately describe or provide the equivalent purpose to the object.
Tests #1, #2 and #3 are true.