HTML and XHTML documents that include images that cannot be described in a short text alternative.
This technique relates to:
User Agent support for longdesc
varies, but overall support is improving. Screen readers such as JAWS, NVDA, and Window-Eyes support longdesc
, but Voiceover 4.0, Orca 2.32.0, and screen magnifier Zoomtext 10.0 do not yet support the longdesc
attribute. Browsers including Internet Explorer, Firefox, Opera, and Chrome all support longdesc.
The objective of this technique is to provide information in a file designated by the
longdesc
attribute when a short text alternative does not adequately convey the function
or information provided in the image. The longdesc
attribute is a URI, the target of
which contains a long description of the non-text content.
Authors can provide a description for an image by including text in a separate resource or within the text of the page containing the image. An advantage of using a separate resource for the description is that it is easily reusable for multiple instances of the same image, it does not add on-page visual clutter to the original document, and the description's end-point is apparent to the user. An advantage of providing the description within the same page as the image is that all users can access the description. A limitation of the on-page method, as well as in providing multiple descriptions on a single separate page, is that current implementations supporting longdesc do not identify the long description's end-point. Authors can solve this by providing a well-formed description, which identifies the where the description ends.
Example Code:
<p><img src="chart.gif" alt="a complex chart" longdesc="chartdesc.html"/></p>
Example Code:
<img longdesc="thispage.html#desc" alt="Line graph of the number of subscribers" src="http://www.company/images/graph.png">
<div id="desc">
<h3>Long Description: Line graph of the number of subscribers</h3>
<!-- Full Description of Graph -->
<p>Long description ends.</p>
<div>
Resources are for information purposes only, no endorsement implied.
Check that the img
element has a longdesc attribute.
Check that the value of the longdesc
attribute is a valid URI of an existing resource.
Check that the content at the target of that URI contains a long description describing the original non-text content associated with it.
#1 through #3 are all true
If this is a sufficient technique for a success criterion, failing this test procedure does not necessarily mean that the success criterion has not been satisfied in some other way, only that this technique has not been successfully implemented and can not be used to claim conformance.
Techniques are informative—that means they are not required. The basis for determining conformance to WCAG 2.0 is the success criteria from the WCAG 2.0 standard—not the techniques. For important information about techniques, please see the Understanding Techniques for WCAG Success Criteria section of Understanding WCAG 2.0.