There are many reasons why describing content adds to its accessibility for all readers. Although often considered only useful for non-visual readers, descriptions facilitate comprehension and provide context for readers with a wide range of needs. They can also assist readers whose first language may not be that of the text being read.
hyperlinks
Plain old hyperlinks remain the most widely accessible way to provide a link to a description.
<figure>
<img src="crime-map.jpg" alt="Crime in Gotham City">
<a href="crime-desc.xhtml">Description</a>
</figure>
The primary advantage of hyperlinks is that they are exposed to all users, unlike the
aria-describedby
attribute described in the next section. Their primary disadvantage
is that they are always visible, and publishers are often prevented from adding any visble content by
their agreements with authors.
Note that a hyperlink does not always have to reference a description in another document; descriptions might be included at the end of a section, like footnotes.
aria-describedby
The aria-describedby
attribute can be used to add a description to any HTML5 element, not
just img
. It is not well supported, however, and is not useful for complex image descriptions
as the text it references is flattened to a simple text string.
Even though a description is a visible part of the current page, linking to it provides a programmatic means for users of assistive technologies to rapidly access the description without having to hunt through the page content.
longdesc
?The longdesc
attribute is an HTML5 extension not currently supported by EPUB. It is
also limited to being attached to img
elements.
aria-details
?The aria-details
attribute is currently under development and not supported by
assistive technologies. It will allow an association to be made with a description in a
details
element. Although similar to aria-describedby
, the
aria-details
attribute will not result in stringified content (i.e., the user
will be able to navigate the description as structured HTML).