Keyboard
Give people a way past the navigation
- Rule:
bypass - Severity: Serious
- WCAG level A
Why it matters
Someone using a keyboard or a screen reader meets the same forty header links on every page. Without a way past them, reaching the content costs forty keystrokes each time.
How to fix it
- Add a "Skip to content" link as the first focusable element, pointing at the main region.
- Wrap the page content in <main id="main"> and use <nav>, <header> and <footer> around it.
- Make the skip link visible when it receives focus — a link nobody can see is a link nobody uses.
In markup
<body>
<nav>... 40 links ...</nav>
<div>Article</div>
</body><body>
<a href="#main" class="skip-link">Skip to content</a>
<nav>... 40 links ...</nav>
<main id="main">Article</main>
</body>The requirement behind it
This rule is one way of failing the following WCAG 2.2 success criteria. The W3C, which writes the standard, explains each of them:
- 2.4.1 Bypass Blocks (opens in new tab) — WCAG level A
Further reading
Deque University on bypass (opens in new tab)
Deque maintains axe-core, the open-source engine our scanner runs. Their page documents the rule as the engine implements it.
Automated checks find failures a browser can prove. They cannot judge whether a caption is accurate, whether an alt text is useful, or whether a page can be operated end to end with a keyboard — those need a person.