W3C home Web Accessibility Initiative (WAI) home

WAI: Strategies, guidelines, resources to make the Web accessible to people with disabilities

[DRAFT] Complex images

Complex images are those that contain substantial information, more than can be conveyed in a short phrase or sentence. These are typically:

  • Graphs and charts, including flow charts and organizational charts;
  • Diagrams and illustrations where the page text relies on the user being able to understand the image.

In these situations a two-part text alternative is required, first the short description to identify the image and, where appropriate, indicate the location of the second part, which is a long description of the image. The long description must be a textual representation of the essential information conveyed by the image. In certain situations the composition of the image may also be needed as part of the long description, but only where it is important that the user understands the image construction. This page shows several possible approaches that can be used to provide both short and long descriptions.

Example 1: Image containing substantial information

This bar chart of website visitor statistics has the short description "2013 first quarter example.com website visitors bar chart" as the alt attribute, to identify the image. The long description needs to provide the same data, including scales, values, relationships, and trends, that is represented visually. For example, the declining values for site 1, consistent values for site 2, and increasing values for site 3 are highlighted through the bar chart representation. This information needs to be made available in the long text description as well.

2013 first quarter example.com website visitors bar chart

Approach 1: Providing a link to the long description via longdesc

Here the longdesc attribute contains the URI of the page containing the long description. Where appropriate, the longdesc value could simply contain a hash link to the long description if it is published on the same page as the image.

<p>
<img src="../img/chart.png" alt="2013 first quarter example.com website visitors bar chart " longdesc="2013first_qtr_text.html">
</p>

Note: Both Firefox and Chrome browsers are working on implementations that will make the longdesc linked long description location reachable by all users. In older or other browsers it is only available to screen reader users.

Approach 2: A text link to the long description adjacent to the image

This approach provides a text link next to the image. The link text makes both the destination and the association with the image clear.

<p>
<img src="../img/chart.png" alt="2013 first quarter example.com website visitors bar chart ">
<br>
<a href="2013first_qtr_text.html">Example.com Site visitors Jan to March 2013 text description of the bar chart</a>
</p>

Approach 3: Structurally associating the image and its adjacent long description (HTML5)

The HTML5 <figure> element can be used to enclose both the image and its long description. The long description is explicitly associated to the image by using role="group" on the containing figure element.

<figure role="group">
<img src="../img/chart.png" alt="2013 first quarter example.com website visitors bar chart ">
<table>
<caption>Example.com Site visitors Jan to March 2013</caption>
<tr>
...
</tr>
</table>
</figure>

Approach 4: Describing the location of the long description in the alt attribute

If the long description is on the same page as the image and its location can be accurately pinpointed by being described, the alt attribute can include location information.

<p>
<img src="../img/chart.png" alt="2013 first quarter example.com website visitors bar chart. Described under the heading Site visitors full text">
</p>
...
<h4>Site visitors full text</h4>