Building a Skip Link That Actually Works
Wire the anchor to a focusable target.
Two Halves of a Skip Link
A working skip link has two parts: an anchor that links somewhere, and a target it can actually land on. Both must exist.
The Anchor Half
The anchor is a normal link whose href is a fragment, like a hash followed by an id. Clicking it tells the browser where to go.
<a href="#main">Skip to main content</a>All lessons in this course
- Why Skip to Main Content Exists
- Building a Skip Link That Actually Works
- Visually Hidden Until Focused
- Multiple Bypass Links for Big Pages