# Skip Link

> The Skip Link accessible element helps users quickly navigate to the main content, bypassing repetitive elements like headers and menus.

## How do I add a skip to main content link?

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.

- Topic: Accessible Elements
- Type: concept

## Example

Wrong:

```css
.skip-link {
  display: none;
}
```

Right:

```css
.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.

## Related cards

- [main](https://wonderium.dev/a11y/main.md)
- [sr-only](https://wonderium.dev/a11y/sr-only.md)
- [:focus-visible](https://wonderium.dev/css/focus-visible.md)
- [\[tabindex\]](https://wonderium.dev/html/tabindex.md)
- [WCAG](https://wonderium.dev/a11y/wcag.md)

---

- Level: [Accessibility](https://wonderium.dev/a11y.md)
- HTML version: https://wonderium.dev/a11y/skip-link
- Last updated: 2026-11-25
