Keyboard accessibility

Skip Link Generator

Help keyboard and screen reader users jump past repeated navigation. Configure a skip link, check its contrast and copy production-ready HTML and CSS.

-Contrast ratio
-WCAG AA (4.5:1)
-WCAG AAA (7:1)
Live preview - click inside the box, then press Tab.
HTML - place right after <body>
CSS

Runs entirely in your browser. Nothing is uploaded to any server.

Why every site needs a skip link

Faster keyboard navigation

Keyboard users otherwise have to tab through every header and menu link on every single page.

WCAG requirement

Success criterion 2.4.1 Bypass Blocks asks for a way to skip repeated content; a skip link is the classic solution.

Invisible until needed

The link stays out of sight for mouse users and appears only when it receives keyboard focus.

How to use the skip link generator

  1. ConfigureSet the link text, the id of your main content and the reveal style.
  2. Style and checkPick colors, size and position while watching the contrast ratio.
  3. Test and copyTab into the preview to try it, then copy the HTML and CSS into your site.

How to add a skip link correctly

Place the skip link as the very first focusable element inside the body so it is the first thing a keyboard user reaches. Its href must match the id of your main content area, usually the main element. Adding tabindex="-1" to that target ensures focus actually moves there in every browser, so the next Tab continues from the main content rather than the top of the page.

Never hide a skip link with display:none or visibility:hidden, because hidden elements cannot receive focus. Both reveal styles here keep the link focusable: one moves it off-screen above the viewport, the other clips it to a single pixel until it is focused. Make sure it is clearly visible on focus with strong contrast and a focus outline.

First in the DOM

Put the link before the header so it is the first Tab stop.

Focusable target

tabindex="-1" on main lets focus land there reliably.

Visible on focus

High contrast and an outline make it obvious when it appears.

Skip link generator FAQ

Where should the skip link go in my HTML?

Immediately after the opening body tag, before your header, logo and navigation.

Why does the target need tabindex="-1"?

Some browsers scroll to the target but do not move keyboard focus to it unless it is focusable. tabindex="-1" makes it focusable by script and links without adding it to the Tab order.

Is a skip link still needed if I use landmarks?

Landmarks help screen reader users, but sighted keyboard users cannot jump between landmarks without extra tools. A skip link helps both groups.

Which reveal style is better?

Both are accessible. The slide-down style animates in; the visually hidden style appears instantly and avoids layout issues in some designs.

What contrast ratio should the link have?

At least 4.5:1 between text and background for normal text, per WCAG AA.

Try other accessibility tools

More free tools from My Panda Toolbox.