Web Accessibility - Skip Links
Skip Links
Most web pages start with a logo and a menu. A keyboard user would have to press Tab through every menu link on every page before reaching the content.
A skip link solves this. It is the first link on the page, and it jumps straight to the main content:
Example
<body>
<a href="#main" class="skip-link">Skip to main content</a>
<header>...</header>
<nav>...</nav>
<main id="main">
<h1>Welcome</h1>
...
</main>
</body>
The link is usually hidden until it gets focus, so it does not change the design:
Example
.skip-link {
position: absolute;
left: 10px;
top: -50px;
padding: 8px 16px;
background: #000;
color: #fff;
}
.skip-link:focus {
top: 10px;
}
Try it Yourself »
Note: Do not hide a skip link with
display: none;. Then it cannot get focus at
all!