Skip to content

Technique H45:Using longdesc

Applicability

HTML documents that include images that cannot be described in a short text alternative.

This technique is not referenced from any Understanding document.

Description

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.

Examples

Example 1: Using longdesc to refer to a long description contained on a separate resource.

<p><img src="chart.gif" alt="a complex chart" longdesc="chartdesc.html"/></p>

Example 2: Using longdesc to refer to a long description within the same page.

<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>

Other sources

No endorsement implied.

Tests

Procedure

  1. Check that the img element has a longdesc attribute.
  2. Check that the value of the longdesc attribute is a valid URI of an existing resource.
  3. Check that the content at the target of that URI contains a long description describing the original non-text content associated with it.

Expected Results

  • #1 through #3 are all true
Back to Top