THE GITHTML FIELD GUIDE
Let keyboard readers skip a long table of contents
Provide an early skip link to the main reading content when a long navigation block would otherwise require many keyboard stops. The destination must exist, and the next navigation action should continue from the intended content. Keep the skip link discoverable on focus and test its behavior in the actual browser or reading container.
Understand the access barrier
A fifty-entry contents list can be useful for choosing a section but tedious when a reader simply wants to begin the article. A skip link offers a different route without removing the navigation itself.
Use a deliberate document pattern
Place the link before the repeated or lengthy navigation and give the destination a stable identifier. If necessary, make the target programmatically focusable without adding it as another routine Tab stop. Avoid hiding the focused link behind a fixed header.
- Place the skip option before the navigation it bypasses.
- Use a real destination at the start of the main content.
- Test activation, visible focus, and the next keyboard stop together.
<a href="#main-reading">Skip to report</a>
<main id="main-reading" tabindex="-1"><h1>Report</h1></main>Check the actual reading experience
Activate the skip link and then continue with Tab. Confirm that the route does not unexpectedly return to the top navigation.
Verify that skipping changes the navigation position
Consider a report with sixty contents links followed by the introduction. A reader who already knows they want the main text should not need to traverse all sixty links before reaching its first interactive reference. Put the skip link near the start of the document, before the navigation it bypasses, and name the destination clearly. Skip to report is more useful than Skip when the page contains several possible regions.
The anchor target should be the actual start of the reading content, not an empty spacer far above it. A main element with a stable identifier provides a meaningful destination; tabindex=-1 can make it focusable without inserting another routine Tab stop when the implementation needs that behavior. Do not add positive tabindex values to pull the target ahead of other controls. Also account for sticky headers so the destination heading is not hidden after navigation.
Test more than whether the viewport scrolls. Activate the skip link with the keyboard, identify where focus or sequential navigation now begins, and press Tab again. If it returns to the first contents link, the apparent jump has not delivered the intended keyboard route. Verify backward navigation and the page’s initial focus state as well. A visually hidden-until-focused skip link must become clearly visible when focused and remain usable at increased zoom. In a static export, confirm the destination identifier survived generation and is unique. If an embedded reading container handles fragment navigation differently, document that observed limitation rather than claiming the presence of an anchor alone proves a working skip mechanism.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.