Skip links must point to an existing target
A skip link must lead somewhere: its href="#id" must match an element on the page that screen readers can reach. This is a best practice, not a WCAG requirement on its own, but a broken skip link defeats its purpose.
| Rule ID | skip-link |
|---|---|
| Impact | Moderate |
| Success criterion | Best practice, not a WCAG requirement |
| Needs a change in the website’s code |
Example
<a href="#content" class="skip-link">Skip to main content</a>
<header>...</header>
<main id="main-content">
<h1>Weekend weather</h1>
</main>Pressing the skip link does nothing. Focus stays at the top and the user tabs through the menu.
<a href="#main-content" class="skip-link">Skip to main content</a>
<header>...</header>
<main id="main-content">
<h1>Weekend weather</h1>
</main>Pressing the skip link moves focus to the article, and the next Tab continues from there.
Why it matters
Keyboard users, screen reader users and people using switch devices rely on the skip link to get past the header on every page. When it works, it saves dozens of key presses.
A broken skip link is worse than none. The user activates it, nothing seems to happen, and they cannot tell whether they missed something or the page is broken. Then they still have to tab through the whole menu.
Skip links break quietly. Nobody using a mouse ever sees them, so a template change that renames id="content" to id="main-content", or a page type without that container, can go unnoticed for months. A target that is hidden with display: none or aria-hidden also leaves the link without a usable destination.
How to fix it
Match the reference. The href must be # followed by the exact id of the target, and the id must be unique:
<a href="#main-content" class="skip-link">Skip to main content</a>
...
<main id="main-content">
Put the target in every template. If the link lives in a shared header, every page type needs an element with that id. Use the main landmark so it is always there.
Keep the target visible. It must not be hidden with display: none, visibility: hidden or aria-hidden="true".
Make focus land there. Modern browsers move the starting point for the next Tab to the target. If you need focus itself to move, for example to show a focus outline or for older browsers, add tabindex="-1" to the target:
<main id="main-content" tabindex="-1">
Show the link on focus. A skip link hidden off-screen must appear when it receives focus, so sighted keyboard users can see and use it.
Checklist
- Match the skip link href to an existing id.
- Use an id that every page template contains.
- Never hide the target from screen readers.
- Make the skip link visible when focused.
How the check works
The check looks at links whose href starts with # or /# and that are positioned off-screen, the usual pattern for a skip link that appears on focus. It fails when no element matches the reference, and asks for a review when the target exists but is hidden from screen readers. It does not test that the link appears on focus: press Tab on a fresh page load to confirm.
Resources
- Page regions W3C WAI
Updated October 27, 2026