A skip navigation link lets keyboard users jump past the site header and navigation directly to the main content. Without one, a keyboard user must press Tab through every navigation link on every page — potentially 20–50 Tab presses just to reach the first paragraph of content.
<!-- First element inside <body> --> <a href="#main-content" class="skip-link">Skip to main content</a> <header> <nav>...navigation with many links...</nav> </header> <main id="main-content"> <h1>Page title</h1> <p>Content starts here...</p> </main>
.skip-link {
position: absolute;
top: -100px;
left: 16px;
z-index: 9999;
padding: 12px 20px;
background: #2563eb;
color: #ffffff;
font-weight: 700;
font-size: 1rem;
border-radius: 0 0 8px 8px;
text-decoration: none;
transition: top 0.1s ease;
}
.skip-link:focus {
top: 0; /* Slides down into view on Tab */
}
This pattern hides the link off-screen until it receives keyboard focus. When a user presses Tab as their first action, the skip link slides into view. Pressing Enter activates it.
See how 321 websites scored →
View the 2026 ReportA common implementation bug: the skip link successfully moves the scroll position to #main-content, but screen readers don't actually move focus there. The fix is to make the target focusable:
<!-- Add tabindex="-1" so it can receive programmatic focus --> <main id="main-content" tabindex="-1"> <h1>Page title</h1> ... </main>
tabindex="-1" makes the element programmatically focusable (via the anchor link and JavaScript) without adding it to the natural tab order. This is exactly what you want for the skip link target.
<main>, not back in the navigationIf step 4 sends you back to the navigation, add tabindex="-1" to the <main> element.
Complex pages with multiple repeated sections may benefit from multiple skip links:
<nav class="skip-links" aria-label="Skip navigation"> <a href="#main-content" class="skip-link">Skip to main content</a> <a href="#main-nav" class="skip-link">Skip to navigation</a> <a href="#search" class="skip-link">Skip to search</a> </nav>
Show all skip links on first Tab, then hide them after the user moves past them. Don't add more than 3–4 skip links — they become their own navigation burden.
// React: on route change, move focus to main content
import { useEffect, useRef } from 'react';
import { useLocation } from 'react-router-dom';
function MainContent({ children }) {
const mainRef = useRef(null);
const location = useLocation();
useEffect(() => {
// Move focus to main content on route change
if (mainRef.current) {
mainRef.current.focus();
}
}, [location.pathname]);
return (
<main id="main-content" ref={mainRef} tabIndex={-1}>
{children}
</main>
);
}
display:none or visibility:hidden — screen readers skip it tootabindex="-1" — focus doesn't move, only scroll doesAccessalyze tests for missing bypass blocks and skip link issues as part of its WCAG 2.4.1 check.
Test Your Skip Link →See real website accessibility scores: Browse 244+ free accessibility audits →
Try it yourself
Enter your website URL to get a free accessibility score.