SkipLink

Enables users to skip directly to primary content in any component.

To implement SkipLink component into your project you’ll need to add the import:

import SkipLink from "@kiwicom/orbit-components/lib/SkipLink";

After adding import into your project you can use it simply like:

<SkipLink
links={[
{
href: "#terms",
name: "Go to terms and conditions",
},
{
name: "Reguest refund",
onClick: handler,
},
]}
/>

Screen reader will read the content in the following order:

  • content of the link
  • aria-label of nav
  • navigation

Props

The table below contains all types of props available in the SkipLink component.

NameTypeDescription
buttonLabelstringDescription for screen readers.
linkslinks[]An array specifying links to point to.

links

The table below contains all types of props available for links array.

NameTypeDescription
namestringName of a action.
linkstringA href for linking to another page.
onClick() => void \| PromiseCallback for handling action.

Functional specs

  • SkipLink is visible only on focus.

Rationale

SkipLink is used to adress WCAG2.0 Criterion 2.4.1. The intent of this is to allow people who navigate sequentially through content more direct access to the primary content and common actions of the Web page which can be hidden inside menus or in otherwise complex content.