Search topics
Skip links that are missing or can't be reached
The skip link is hidden with display: none, and the content sits in a plain div, so nothing lets people jump past the menu.
The problem
Keyboard users must Tab through the whole menu on every page before they reach the content
A garden centre's shop has a header with its logo, twelve category links, a search field, an account link and a basket. Someone using a keyboard opens the "Spring bulbs" page and presses Tab. Focus goes to the logo, then to each category in turn, then search, account and basket. The first product is the seventeenth stop. On the next page, the same sixteen stops come first again.
The theme has a skip link, but its stylesheet hides it with display: none so that it never shows. That also removes it from the tab order, so nobody can use it. The content sits in a div, the header in another div, and the first heading is styled text in a p. There is no landmark or heading to jump to with a screen reader either. WCAG 2.4.1 asks for some mechanism to bypass blocks repeated on every page, and this page offers none.
The cost repeats on every page that shares the header, so it grows with each page a visitor opens.
3 of 10 groups affected
- No vision (affected)
- Low vision (affected)
- Colour vision (not affected)
- No hearing (not affected)
- Hard of hearing (not affected)
- No speech (not affected)
- Motor (affected)
- Reach, strength (not affected)
- Cognitive (not affected)
- Seizures (not affected)
- Limited manipulation Keyboard and switch users move one stop at a time and pay the cost of the header on every page. For a switch user each stop can take seconds.
- Without vision Screen reader users can usually jump by landmark or heading, but only if the page has them.
- Limited vision People using screen magnifiers lose their place as focus travels across a wide header.
A scanner finds the skip link in the markup and may count it as present, even though display: none takes it out of the tab order: axe's bypass rule accepts any in-page link as a mechanism. Its skip-link rule checks that the target exists, but it skips a link hidden with display: none, and it does not check that focus really moves there rather than only scrolling. A generated fix can add <a href="#main"> and forget to give any element id="main". Single-page apps can break a working skip link by intercepting hash links in the router.
What the checkers report
- axe DevTools
- Page must have means to bypass repeated blocks
- The skip-link target should exist and be focusable
- Lighthouse
- The page does not contain a heading, skip link, or landmark region
- Skip links are not focusable.
- WAVE
- Broken skip link
- Broken same-page link
Try it
Press Tab until you reach the first product
Count the stops before the content.
On the fixed side, press Enter on the first stop.
Broken Can you fix this?
Spring bulbs
Tab presses to the content: 0
Screen reader landmarks: none
The fix
Give people a way past the repeated header
<a class="skip-link" href="#content">Skip to content</a><div class="header"> <a href="/">Fernway Garden</a> <ul class="menu">…12 category links…</ul> <input type="search" aria-label="Search"> <a href="/account">Account</a> <a href="/basket">Basket</a></div><div class="content"> <p class="title">Spring bulbs</p> …</div>What is wrong3 points
- Nobody can use the skip link:
display: noneremoves it from the tab order. - Even shown, the link would lead nowhere:
#contentmatches no id. - There is no way past the header at all: the page has no landmarks and no heading for a screen reader to jump to either.
A skip link shown on focus
<a class="skip-link" href="#main">Skip to main content</a><div class="header"> <a href="/">Fernway Garden</a> <ul class="menu">…12 category links…</ul> <input type="search" aria-label="Search"> <a href="/account">Account</a> <a href="/basket">Basket</a></div><main id="main" tabindex="-1"> <h1>Spring bulbs</h1> …</main>How it is fixed3 steps
- Move the link out of view with
transforminstead ofdisplay: none, and bring it back on:focus. It stays the first Tab stop and moves into view when it has focus, so sighted keyboard users can see it and use it. - Point it at
#main, and make the content amainwith that id, starting with anh1. Its target now exists. - Add
tabindex="-1"tomain, so it takes focus and the next Tab starts inside the content in every browser rather than back at the header.
This fixes the Before and passes 2.4.1.
Both pass 2.4.1. The skip link is the only one that helps a sighted person on a keyboard or a switch, and it costs one link and a few lines of CSS. Landmarks and a heading cost nothing to keep, help every screen reader user and also meet 1.3.1, but leave the Tab journey as long as before. Use the skip link and add the landmarks too; if only one is possible in this release, start with the skip link.
Hide the link with a transform, a clip or an off-screen position, never with display: none, visibility: hidden or hidden, and remove the hiding on :focus. Give it the same focus ring as other links and a contrast that passes on the header.
tabindex="-1" on main lets some browsers draw a focus ring around the whole content. That is acceptable, and it shows where focus went; if you remove it, use main:focus:not(:focus-visible) rather than outline: none. Don't make main a normal Tab stop with tabindex="0".
A sticky header can cover the top of main after the jump. Add scroll-margin-top to the target, the height of the header. In a single-page app, check that the router does not swallow #main links; if it does, handle the click and call focus() on the target. Keep the skip link in the shared layout, so every page has it and its target.
One skip link to the main content is enough for most sites. Add more ("Skip to filters") only when another long block repeats too.
Design ideas
A skip link can be drawn more than one way
Three copies of the shop’s header, each with its own skip link as the first Tab stop. Tab into each one, press Enter on its skip link, then press Tab again: two take you on into the content, and one sends you back to the logo.
In the design file
- Draw the skip link as it appears when focused, at the top left of the header, as the first thing Tab reaches.
- Use the same focus ring as the page’s other links.
- Write the link’s contrast ratio against what is behind it, at least 4.5:1.
- Show where the jump goes, the main heading, placed so a sticky header doesn’t cover it.
Passes
- Full-width band that slides down A band across the whole top, hard to miss at any zoom: white on #1a4fd0 at 6.83:1, ringed in white inside. It slides down in 0.2 seconds and stops; with reduced motion it simply appears.
Rule of thumb: Move to show a change, then stop
- Spring bulbs Tulips, crocus and alliums to plant now.Always shown, in a slim strip Nothing to reveal: a small underlined link in a white strip above the header, #1a4fd0 at 6.83:1. Mouse and switch users see it too; it costs one slim line on every page.
Fails
- Skip to main contentSpring bulbs Tulips, crocus and alliums to plant now.Glass pill that only scrollsWCAG 2.4.1 A frosted pill that appears on the first Tab and glides the page down to the content, but leaves focus on itself. The next Tab lands on the logo, so a keyboard user tabs through the whole header after all.
Verify the fix
5 checks, no mouse.
Test with: Keyboard, Screen reader, Zoom
Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the header or the layout changes.
Limits
This is a starting pattern, not a guarantee for every application. Pages with several repeated blocks, iframes or app shells may need more than one way past them. Where the landmarks themselves are missing or in the wrong place, such as a layout that wraps the header in main, see landmarks that are missing, misplaced or leave content out. Test the complete journey on your real pages.
This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.
EaseWeb service
Fixed it? Keep it from coming back.
I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.