← All guides

Keyboard navigation: why it matters beyond accessibility

Skip navigation links: the 2-second shortcut power users need

Why 'Skip to main content' links exist, how to implement them in Shopify, and how they speed task completion.

Press Tab on most e-commerce sites and count. One, two, three… you’re still in the header. Ten, fifteen, twenty… you’ve made it past the navigation menu. Twenty-five tabs later, you finally reach the main content.

For someone using a mouse, that header is invisible overhead. For keyboard users, it’s a wall they climb every time they load a page—or navigate back to a previously visited page. On a store with a 30-item mega menu, that wall can take over a minute to traverse.

Skip navigation links solve this problem in two seconds. Press Tab once, hit Enter, and you’re at the content. It’s the simplest accessibility feature in web development, yet most Shopify stores don’t have one—and many that do implement it incorrectly.

Quick read
  • WCAG 2.4.1 (Level A) requires a mechanism to bypass repeated content blocks—skip links are the standard solution
  • The average e-commerce header forces keyboard users through 20-40 tab stops before reaching main content
  • Skip links reduce navigation overhead from 30+ seconds to under 2 seconds per page
  • Only 32% of the top 1 million websites have a functioning skip link (WebAIM 2024)
  • GitHub, Amazon, and Google all use skip links—they're standard practice, not an edge case

Every website has repeated content blocks: the logo, the main navigation, the search bar, promotional banners, maybe a utility bar with login/cart links. Mouse users skip past these instantly—their eyes jump to the content and their cursor follows.

Keyboard users don’t have that luxury. Tab order is linear. Every interactive element in the header gets visited in sequence: logo link, each nav item, search button, cart icon, account link. If your mega menu is expandable, each submenu item adds to the count.

WCAG Success Criterion 2.4.1 (Bypass Blocks) exists specifically to address this. At Level A—the minimum compliance level—it requires “a mechanism to bypass blocks of content that are repeated on multiple Web pages.”

Skip navigation links are the universally accepted solution. The W3C Web Accessibility Initiative lists them as the preferred technique for satisfying 2.4.1.

To quantify the issue, consider a typical Shopify store header:

Element Tab Stops
Logo (link) 1
Main navigation items (6 categories) 6
Mega menu links per category (avg 8) 48
Search button 1
Account/login 1
Cart icon 1
Promotional banner link 1
Language/currency selector 2
Total 61

At roughly 0.5 seconds per Tab press, that’s 30 seconds of overhead before reaching main content. On every page. If a user visits 5 pages in a session, that’s 2.5 minutes of tabbing through the same navigation.

Screen reader users experience this even more acutely. Each tab stop isn’t just a visual jump—the screen reader announces the element: “Link, Women’s Clothing. Link, Men’s Clothing. Link, Kids. Link, Sale…” Every announcement takes 1-2 seconds of audio.

A functioning skip link eliminates all of that.

A skip link is an anchor link that targets the main content area. It’s the first focusable element on the page—meaning the first thing that appears when a user presses Tab.

Basic Implementation

The HTML is minimal:

<!-- First element inside <body> -->
<a href="#main-content" class="skip-link">Skip to main content</a>

<!-- ...header, navigation, etc... -->

<!-- Main content area -->
<main id="main-content" tabindex="-1">
  <!-- Page content here -->
</main>

The tabindex="-1" on the <main> element is important. Without it, some browsers won’t move focus to the target when the skip link is activated. The element needs to be programmatically focusable even though it shouldn’t appear in the normal tab order.

CSS: Visible When Focused, Hidden Otherwise

Skip links are typically hidden until the user presses Tab. This keeps them invisible for mouse users while making them the first thing keyboard users encounter:

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}

.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  padding: 12px 24px;
  background: #000000;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 100000;
}

When the skip link receives focus (user presses Tab), it slides into view at the top-left corner. It’s large, high-contrast, and unmissable. When focus moves past it, it disappears again.

Why display: none Doesn’t Work

A common mistake is hiding skip links with display: none or visibility: hidden:

/* DON'T do this */
.skip-link {
  display: none;
}
.skip-link:focus {
  display: block;
}

Elements with display: none are removed from the tab order entirely. The skip link becomes unfocusable—it might as well not exist.

The correct technique uses off-screen positioning. The element is still in the DOM and in the tab order; it’s just visually positioned where no one can see it until focused.

Adding a skip link to a Shopify store requires editing the theme’s layout file. Here’s the step-by-step process.

Step 1: Edit theme.liquid

Open your Shopify theme editor and navigate to Layout > theme.liquid. Find the opening <body> tag and add the skip link immediately after it:

<body>
  <a href="#MainContent" class="skip-link">Skip to content</a>
  <!-- rest of your theme... -->

Step 2: Add the Target ID

Find where your main content begins. In most Shopify themes, this is a <main> tag or a <div> with a specific class. Add the target ID:

<main id="MainContent" role="main" tabindex="-1">

Many Shopify themes already have an element with id="MainContent". Check your theme before adding a duplicate.

Step 3: Add the CSS

Add the skip link styles to your theme’s CSS file. Use the styles from the previous section, adjusting colors to match your brand.

Step 4: Test

Press Tab on your store’s homepage. The skip link should appear at the top-left corner. Press Enter. Focus should jump to the main content area, bypassing the entire header.

Test on multiple pages—product pages, collection pages, cart, and checkout—to verify the skip link works consistently.

Some sites benefit from more than one skip link. If your page has multiple content regions (sidebar filters, product grid, footer navigation), you can provide shortcuts to each:

<div class="skip-links">
  <a href="#MainContent" class="skip-link">Skip to content</a>
  <a href="#ProductGrid" class="skip-link">Skip to products</a>
  <a href="#SearchBar" class="skip-link">Skip to search</a>
</div>

Each additional skip link appears when the user presses Tab past the previous one. The first Tab shows “Skip to content,” the second shows “Skip to products,” the third shows “Skip to search.”

Use this pattern sparingly. Two or three skip links is helpful. Ten skip links defeats the purpose—you’re just creating another block to bypass.

How Top Sites Handle This

  • GitHub: Two skip links—”Skip to content” and “Skip to footer navigation”
  • Amazon: One skip link—”Skip to main content”
  • Google: One skip link—”Skip to main content” (appears on search results)
  • BBC: Three skip links—”Skip to content,” “Accessibility Help,” and “Skip to Live Chat”

The industry consensus is that one or two skip links covers 95% of use cases.

Common Implementation Mistakes

Despite being one of the simplest accessibility features, skip links fail surprisingly often. WebAIM’s 2024 Million Home Pages report found that only 32.4% of the top million websites had a functioning skip link.

Here are the most common failures:

The skip link exists, but the target ID doesn’t match:

<!-- Link targets #main -->
<a href="#main" class="skip-link">Skip to content</a>

<!-- But the content has a different ID -->
<main id="MainContent">

Pressing Enter on the skip link does nothing. The user is left confused.

Fix: Verify that the href value matches the id on the target element. Test by clicking the skip link and checking whether focus moves.

Mistake 2: Target Isn’t Focusable

Without tabindex="-1", some browsers won’t move focus to the target:

<!-- Missing tabindex -->
<main id="MainContent">

The URL hash changes (you see #MainContent in the address bar), but focus stays where it was. The user presses Tab and gets the next header element instead of the first content element.

Fix: Add tabindex="-1" to the target element.

Some implementations keep the skip link permanently hidden:

.skip-link {
  display: none !important;
}

This violates WCAG. Skip links must be visible when focused. They can be off-screen by default, but they must appear on focus.

Fix: Use the off-screen positioning technique described above, not display: none.

If the skip link isn’t the first focusable element, it defeats its purpose. Users tab through other elements before reaching it:

<body>
  <div class="promo-bar">
    <a href="/sale">Summer Sale - 20% Off</a>
  </div>
  <a href="#MainContent" class="skip-link">Skip to content</a>

Here, the promotional banner link gets focus first. The skip link is second.

Fix: Place the skip link as the very first child of <body>, before any banners, headers, or other content.

Skip links benefit all keyboard users, but they’re especially important for screen reader users.

When a screen reader encounters a page, it reads elements in DOM order. Without a skip link, the user hears the full header on every page: “Banner, link, Navi Plus. Navigation, list, 6 items. Link, Women’s Clothing. Link, Men’s Clothing…” This takes 30-60 seconds per page.

With a skip link, the screen reader announces: “Link, Skip to content.” The user presses Enter and immediately hears the page heading or first paragraph.

Modern screen readers also have built-in landmark navigation (press H to jump to headings, press 1-6 for heading levels, press D for landmarks). But skip links are a universal fallback that works even when semantic HTML is imperfect.

Shopify theme checkIf you're using a Shopify Dawn-based theme (2.0+), the skip link is already built in. Search your theme.liquid for "skip" to verify. If you're on an older theme or a custom theme, you'll likely need to add one manually.

Skip links aren’t just about accessibility compliance. They’re a productivity feature.

Consider a B2B buyer placing a weekly order. They visit your store, go directly to a collection page via bookmark, and start adding products. If they’re using keyboard navigation (many data entry professionals do), every page reload forces them through the header again.

Without skip links: 30 seconds of header tabbing per page, 20 pages per session = 10 minutes wasted on repeated navigation.

With skip links: 2 seconds per page, 20 pages per session = 40 seconds total.

That’s a 93% reduction in navigation overhead. For a frequent buyer, this is the difference between “tolerable” and “efficient.” It’s the kind of detail that turns a one-time customer into a regular.

Tools like Navi+ Menu Builder can help by generating navigation structures that work well with skip links and keyboard navigation out of the box—meaning you don’t have to retrofit these patterns into a theme that wasn’t designed for them.

Testing Checklist

Before considering your skip link implementation complete, verify each of these:

  1. Press Tab on a fresh page load. The skip link appears visually at the top of the viewport.
  2. Press Enter on the skip link. Focus moves to the main content (verify with Tab—the next focused element should be inside main content, not in the header).
  3. The skip link has sufficient contrast (4.5:1 for text, since it’s normal-sized text).
  4. The skip link works on every page type: homepage, collection, product, cart, search results, blog.
  5. On mobile (test in browser dev tools), the skip link still appears and functions correctly.
  6. The skip link is the first focusable element on the page—nothing else gets focus before it.
  7. After using the skip link, pressing Shift+Tab moves focus back into the header (not to the skip link again).

If all seven pass, your skip link implementation is solid. It took 15 minutes to build and will save keyboard users hours of cumulative frustration.

This article is part of the larger guide on Keyboard navigation: why it matters beyond accessibility.

Share Facebook X

Get started with Navi+ AI Menu Builder

Pick your platform — free to install, live in minutes.