Skip to content
easeweb
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.

WCAG 2.2
SC 2.4.1A
Required by
Section 508 · EN 301 549 (EU)
Broken
The accessibility problem illustrated: Motor:Do I have to go through all of this?
01

The problem

Keyboard users must Tab through the whole menu on every page before they reach the content

02

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?

BrokenA skip link nobody can reach

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Give people a way past the repeated header

Before
BrokenA skip link nobody can reach
<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: none removes it from the tab order.
  • Even shown, the link would lead nowhere: #content matches 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.
After

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
  1. Move the link out of view with transform instead of display: 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.
  2. Point it at #main, and make the content a main with that id, starting with an h1. Its target now exists.
  3. Add tabindex="-1" to main, 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.

04

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

  • Skip to main content
    Spring bulbs Tulips, crocus and alliums to plant now.
    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.
  • Skip to main content

    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 content
    Spring 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.
05

Verify the fix

5 checks, no mouse.

Test with: Keyboard, Screen reader, Zoom

0 of 5 checked

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.

See the service