A skip-navigation link helps people who navigate with keyboards get past a repeated site menu. Make it the first meaningful focus stop. The important question is always where the link leads and whether the person reading the page can predict it.
What You Need to Know
An accessible skip link also needs a visible focus style and a destination at the start of the main content, not a random decorative wrapper.
Links are the pathways through a website. The words on a link should help someone choose where to go before clicking it.
Example: See It in Action
Add this example to the appropriate part of a practice HTML page. Read each line before you open the page in your browser.
This is a short HTML fragment. To try it as a webpage, put it inside the body element of a complete HTML document.
<a href="#article-start">Skip to article</a>
<header>
<nav aria-label="Main"><a href="index.html">Home</a>
</nav>
</header>
<main id="article-start" tabindex="-1">
<h1>Article title</h1>
</main>
Let’s Understand the Example
- An a element becomes a working link when it has an href. Its visible text should tell readers where they will go.
- Nav identifies a major collection of navigation links.
- Header introduces a page or section, often with a title and navigation.
- Href contains the destination of a link. A value starting with # points to an id on the same page.
- Aria-label supplies an accessible name when a visible label is unavailable or inadequate.
- Id gives one element a unique name within the page, so a link, label, or script can point to it.
The first example link points to #article-start. Check whether that destination exists relative to the document. A link changes where readers go; it does not perform an action such as saving a form.
What Should You See?
You should see a link named “Skip to article”. Selecting it leads to #article-start when that destination exists. Try it with the mouse and the keyboard.
Imagine this link is read out of context. Would its text still explain the destination? Rename unclear links before trying to make them look nicer with CSS.
Try It Yourself
- Press Tab after loading the page and confirm the link becomes reachable.
- Save your changes, open or refresh the page, and compare the result with the original example.
- Tell a friend what your change did. If you are not sure, undo it, refresh the page, and compare.
Common Beginner Mistakes
- Hiding the skip link permanently, including when it receives focus.
- Avoid dead links, empty href values and clickable-looking text without a real destination.
Key Takeaways
- A skip-navigation link helps people who navigate with keyboards get past a repeated site menu.
- An a element becomes a working link when it has an href. Its visible text should tell readers where they will go.
- An accessible skip link also needs a visible focus style and a destination at the start of the main content, not a random decorative wrapper.