Skip to main content

Skip

Accessibility skip-to-content link that is visually hidden until it receives keyboard focus, letting keyboard users jump past repeated header navigation directly to the main content area. Should be the first focusable element in the DOM.

Usage​

When to use

  • On every page of a site, as the first focusable element
  • When the page has repeated navigation (header, nav, breadcrumb) that keyboard users would otherwise have to tab through on every visit

When not to use

  • Inside a component - the skip link is a page-level feature
  • As a visible decorative link - it is intentionally hidden until focus

Do

  • Point the link at the main landmark (e.g. #main-content)
  • Place the link as the first focusable element in the DOM
  • Ensure the target has tabindex="-1" if necessary so focus lands correctly

Don't

  • Hide the link with display: none or visibility: hidden - that removes it from keyboard users too
  • Link to an element that cannot receive focus

API​

Slots​

SlotRequiredDescription
contentYesVisible link text shown when the link receives focus.

Props​

PropTypeDefaultDescription
targetstring#main-contentAnchor href pointing to the main content landmark.
classesarray-Additional CSS class words merged into the root element.
attributesobject-Additional HTML attributes spread on the root element.

Classes​

ClassCapabilityDefaultDescription
.smSize-Small.
.mdSizeYesMedium.
.lgSize-Large.

Accessibility​

  • WCAG 2.2 AA (Success Criterion 2.4.1 Bypass Blocks)
  • Keyboard operable and visible on :focus / :focus-visible
  • First focusable element in the DOM on every page
  • Sufficient color contrast when visible
  • Target element is a landmark or container that can receive focus
  • header - the skip link typically precedes the header