Imagine using Tab to reach a contact form, only to pass the logo, menus, search, and account links on every page first. A skip link gives keyboard and screen reader users a shortcut past repeated content to a useful destination, usually the main content. section 5.3.3
Place skip links early in the page and keep their placement consistent across pages. Make the first link the first focusable element in the DOM so it appears when a keyboard user presses Tab after loading the page. section 5.1.4 section 5.3.3
<nav class="skip-links" aria-label="Skip links"> <a href="#main-content">Skip to main content</a> <a href="#sidebar">Skip to sidebar</a> <a href="#site-navigation">Skip to site navigation</a> </nav>
Use ordinary links with clear destinations. More than one shortcut can help when users need to reach distinct areas, such as main content or a sidebar. section 5.3.3
<nav id="site-navigation" aria-label="Main navigation"> ... <main id="main-content"> ... <aside id="sidebar" aria-labelledby="sidebar-heading">
Give each destination an id matching its link’s href. Native landmarks such as <main> can serve as skip-link targets. section 5.3.3 section 5.2
.skip-links { #A
position: absolute;
inset-block-start: 0;
inset-inline-start: 0;
z-index: 100; #B
}
.skip-links a { #C
position: absolute;
transform: translateY(-120%); #D
background: #000;
color: #fff;
border: 2px solid currentColor;
padding: 0.5rem 0.75rem;
text-decoration: none;
z-index: 1000;
}
.skip-links a:focus { #E
transform: translateY(0); #F
}
:target { #G
outline: 3px solid currentColor;
outline-offset: 0.25rem;
}
Keep the links out of the way until they receive keyboard focus, then show them clearly. The target outline helps identify where the shortcut lands. section 5.3.3
TIP: Test from a freshly loaded page using only the keyboard: does the shortcut appear on the first Tab press, and does it reach the intended area? NOTE: A booking page might offer separate shortcuts to bypass navigation and reach search filters. Choose destinations that save users meaningful effort. section 5.3.3

