Fleetline

Skip link

Usage

Every Fleetline page starts with a skip link so keyboard and switch users can jump past the top navigation straight to the content. It's invisible until focused.

Anatomy

  1. Link — <a class="skip-link" href="#main">, clipped off-screen until focused
  2. Target — <main id="main" tabindex="-1">

Examples

This page's own skip link is the real thing: press Tab from the top. The demos below render a frozen copy in place (.skip-link--preview), made inert so they don't add tab stops.

API

HookValuesPurpose
.skip-linkblock classHidden until focused, then fixed at the top inline-start corner above sticky headers
.skip-link--previewdocs-only modifierRender in flow inside a demo
.is-focus-visibledocs-only classFreeze the visible state

Do and don't

<a class="skip-link" href="#main"> as the first element of <body>.

Do put it first and point it at a focusable target.

.skip-link { display: none }

Don't hide it with display: none — it then never receives focus.

Accessibility

Keyboard interaction
KeyBehavior
Tab (first press)Focuses and reveals the skip link
EnterMoves focus to #main; the next Tab continues from there

Tokens

Custom propertyPurpose
--color-action-primary-bg | -fgVisible colors
--z-tooltipStays above sticky headers and overlays
--elevation-overlayShadow
--space-2 | -4, --button-radiusPosition, padding, shape
--focus-ring-*Focus ring