Glossary
Skip link
A skip link is a link at the very start of a page that jumps past repeated navigation directly to the main content. It exists for people who move through a page with a keyboard or a switch device, for whom tabbing through forty navigation links on every page is a real and repeated cost. It is usually hidden until focused, and WCAG success criterion 2.4.1 requires some mechanism of this kind.
How one is built
A link, as the first focusable element in the document, whose target is the main content: `<a href="#main">Skip to main content</a>`.
A corresponding `id` on the main content container, normally the `<main>` element.
Hidden until focused, using absolute positioning off-screen rather than `display: none` — which would remove it from the tab order entirely and defeat the purpose.
Visible when focused, with the same visibility requirements as any other focus indicator.
Text that says where it goes. "Skip to main content" is understood immediately; "Skip" alone raises the question of skipping to where.
Why it must become visible
A link that receives focus without any visible change leaves a sighted keyboard user with no idea where they are, and the first press of Enter takes them somewhere unexplained.
Sighted keyboard users are a substantial part of the audience for this feature — people with motor impairments, people using switch access, and people who simply prefer the keyboard.
WCAG's focus visible criterion applies to the skip link exactly as to anything else.
The common implementation moves it into view with a transition when it receives focus, which is both visible and unobtrusive.
What breaks it
A target with no `id`, or an `id` that changed when the template was refactored. The link then does nothing observable.
A target that is not focusable: browsers differ in whether focus follows the fragment to a non-focusable element. Adding `tabindex="-1"` to the target makes the behaviour consistent.
A client-side router intercepting the fragment navigation and handling it as a route change, which loses the focus move entirely.
Anything focusable before it in the document — a hidden search field, a cookie banner, a third-party widget — which means the skip link is no longer the first thing reached.
How to test it
Load the page and press Tab once. The skip link should appear, visibly, as the first focused element.
Press Enter. Focus should move into the main content, and the next Tab should reach the first control there rather than returning to the navigation.
Test on pages other than the home page, since templates frequently differ.
Check that the target `id` exists in the rendered DOM, which is where a client-side rendered page can differ from its source.
On a long page with several repeated blocks — a filter sidebar, a large table of contents — a second skip link past that block is worth adding, since the criterion is about repeated blocks generally rather than about navigation specifically.
Frequently asked questions
- Is a skip link required by WCAG?
- Success criterion 2.4.1 requires a mechanism to bypass repeated blocks. A skip link is the usual implementation; proper landmark structure can also satisfy it for some users.
- Can the skip link stay hidden?
- It may be hidden until focused, and it must become visible on focus. It must not be removed from the tab order with display: none.
- Why does my skip link not move focus?
- Usually because the target is not focusable. Adding tabindex="-1" to it makes the behaviour consistent across browsers.
Sources
Related
VeriFixScan crawls a site and applies its checks to every page it reaches, keeping the evidence behind each finding. Scanning one website is free.
Scan a website