Skip Link

Term side of the Card.
Topic: Accessible Elements
Unit title: Skip Link
Categories: Concept
Explanation side of the Card

Explanation: The link placed first in the page that lets keyboard and screen reader users jump past repeated headers and menus straight to the `<main>` content. It is usually hidden off-screen and must become visible when it receives focus.

Example

Wrongcss
.skip-link {
  display: none;
}
Rightcss
.skip-link {
  position: absolute;
  transform: translateY(-120%);
}
.skip-link:focus {
  transform: translateY(0);
}

The link stays in the tab order and slides into view when focused.

Common mistakes

  • Hiding the skip link with display: none, so keyboard users cannot reach it.
  • The link stays off-screen on focus, so sighted keyboard users don't see it.

Key points

  • The skip link is the first focusable element in the page.
  • It points to an id on <main> that exists, like href="#main".
  • It is visible when focused, not hidden with display: none.
  • The target can receive focus, for example with tabindex="-1" on <main>.

Interview questions

Do I need a skip link if I use landmarks?

Yes. Landmarks help screen reader users, but sighted keyboard users have no other way to skip menus.

Why add tabindex="-1" to <main>?

It makes sure focus moves to the target, so the next Tab continues from the main content.

Analytics cookiesWe'd like to use analytics cookies to see which pages are useful. They're set only if you accept. Privacy Policy