Summary
Providing a table of contents allows readers to more easily understand and navigate the content of a publication.
Techniques
-
Include a table of contents. [[WCAG-2.4.5]]
-
Ensure the table of contents has at least one link to each document in the publication. [[WCAG-2.4.5]]
Examples
Frequently Asked Questions
- Why does EPUB 3 allow NCX files, and do I need to include one?
The NCX file is allowed for forwards compatibility purposes only. An EPUB 2 user agents may open an EPUB 3 publication, but it will not be able to use the new navigation document format.
You can ignore the NCX file if your book won't render properly as EPUB 2 content, or if you aren't targeting cross-compatibility.
Your publication may still open on EPUB 2 user agents even without an NCX. Some user agents, like Adobe Digital Editions, will not provide navigation by table of contents but will open the publication.
Explanation
The table of contents is one of the key methods users use to move around the content of a publication, as it provides users easy access to the major sections of the publication. This, in turn, simplifies quick traversal and random inspection of the content.
A table of contents is typically constructed using an ordered list (ol
) inside of a
nav
element, but the requirements for specific technologies are listed below.
EPUB 3
In EPUB 3, publications must provide a table of contents in the EPUB navigation document (the toc
nav
).
Each list item must either contain a single link (a
) to a section of the document, or a
link or heading (span
) followed by a list of subsections.
If the pronunciation of a link will be ambiguous or incomplete due to embedded images, math content, or
other content without intrinsic text, a title
attribute must be attached containing an
alternate pronunciation.
If an author intends to include the table of contents in the spine of the publication, the hidden
attribute can be used to hide branches from the visual rendering. EPUB user agents are required to ignore
this attribute when they present the table of contents to users outside of the spine (i.e., the hidden links
will be available in the user agent-generated table of contents).
EPUB 2
EPUB 2 makes use of the DAISY NCX file
for provision of a table of contents. The entries of the table of contents are constructed using navPoint
elements. These elements can be nested to create a hierarchical list of navigation points.
Related Links
- EPUB 3 — The
toc nav
Element - HTML — The
nav
element - EPUB 2 — Declarative Global Navigation — the NCX
- Z39.86-2005 — Navigation Control File (NCX)