Structure indexes using sections and lists to simplify access to the subjects.
sectionelement to group related sets of entries. [[WCAG-1.3.1]]
Include a heading for each section [[WCAG-1.3.1]]
ulelement to structure the lists of entries. [[WCAG-1.3.1]]
Include static page break locations in the text to facilitate linking. [[WCAG-1.3.1]]
Frequently Asked Questions
- Should I follow the EPUB Indexes specification?
Following the structuring principles in the document is advised, and the most useful for accessibility are repeated in this page, but the use of
epub:typesemantics is not necessary. While these semantics may be useful for internal publisher workflows, they do not currently enhance indexes in reading systems and the
epub:typesemantics provide no accessibility.
Given the limited uptake of the specification at this time, there is no need to follow the package document identification requirements of the specification.
- Should I use the
sectionelement for the index?
While both are technically acceptable, preference should be given to the
navelement. An index is a navigation aid not dissimilar from the table of contents — it is a list of links to key areas of the content.
- How should I link a topic that covers a range of pages?
If a topic includes a page range, tag the entire range and link it to the first page:
<a href="c02.xhtml#pg49" aria-label="49 to 51">49–51</a>
Avoid linking to the first and last pages, or trying to split the range up and link each individual page. The meaning of index entries is well established, so turning the range into a series of pages may confuse the reader about the extent of discussion, especially if using an assistive technology that does not announce the punctuation.
Make sure to include page break markers in the text so that the user can determine when they've reached the end of the range.
To facilitate navigating the alphabetically and numerically related entries of an index, use nested
section elements. Many indexes include the number or letter as a heading between
each set of entries, but if one is not present or wanted, include the number or letter in an
aria-label attribute on the enclosing section so that it can be announced by
assistive technologies. Also, without an explicit or implicit heading, assistive technologies often
will not provide the ability to move from one section to another (they are treated like purely
Structure the entries in each section using unordered lists, as the alphatized order of the entries is not significant (e.g., an index can be reverse sorted without loss of information). The use of lists allows users of assistive technologies to jump forward and backward through the list items instead of having to move through each one at a time as would result if paragraphs or similar markup is used.
The use of lists not only simplifies navigation, but it also allows the position within the list to be announced, allowing the user to quickly return to the same spot again later, if needed.
The optimal way to reference into digital publications is still evolving, but many publications use static page break markers. These do not have to match a print source; they can be added for purely digital works to ensure stable referencing from indexes.