Description

A navigational aid that provides an ordered list of links to the major sectional headings in the content. A table of contents may cover an entire work, or only a smaller section of it.

Examples

Example 1 — Table of contents with a heading

The label is identified in the aria-labelledby attribute.

<nav role="doc-toc">
   <h2 id="hd05">Contents</h2>
   <ol>
      <li><a href="chapter01.html">Chapter 1</a></li>
      …
   </ol>
</nav>

Relation to ARIA

doc-toc is a landmark role.

Usage

doc-toc is typically used on nav elements.

A label must be provided for the role using one of the aria-labelledby, aria-label or title attributes.

List of all elements allowed on
  • a (without an href attribute)
  • abbr
  • address
  • b
  • bdi
  • bdo
  • blockquote
  • br
  • canvas
  • cite
  • code
  • del
  • dfn
  • div
  • em
  • i
  • img (with alt text)
  • ins
  • kbd
  • mark
  • nav
  • output
  • p
  • pre
  • q
  • rp
  • rt
  • ruby
  • s
  • samp
  • section
  • small
  • span
  • strong
  • sub
  • sup
  • table
  • tbody
  • td
  • tfoot
  • thead
  • th
  • tr
  • time
  • u
  • var
  • wbr

Related Links