Table of contents
Table of contents
Easy to use for everyone
The table of contents has a 'navigation' role applied to it to describe it as a form of page navigation.
The component appears before the main page content in the page's tab order, allowing the user to jump to different sections before having to navigate through all the page content.
For a table of contents that contains a section heading called “When to use”, this would be announced by NVDA as “When to use: link”. This highlights the importance of being descriptive with headings within page content to ensure users can identify sections easily.
Testing
We’ve tested this component against WCAG 2.1 Level AA. It’s been tested with NVDA and VoiceOver, and several different users with different interaction methods.