SkipLinks
Lets keyboard users jump straight to a part of the page. Use to skip repeated navigation at the top of a layout.
Health
Source
Storybook
Playground
No Example
Accessibility
compliant
Platform
Web
- Overview
- Props
What is it?
To facilitate the keyboard navigation, we have to provide a skip link mechanism which allow the user to jump the focus directly to a specific part of the current view.
How it works
At the highest level of the application (idealy right under the <MurrayProvider />) define the skip links area by adding <SkipLinks>. That will set a context of possible anchors declared through childrens and build the list of links at the first top of page.
<SkipLinks>{/* The rest of the app */}</SkipLinks>
Then inside your views you can provide skip links item. That will automatically generate link anchors to quickly move the focus to the item.
<MyView>
<SkipLinks.Item label="Menu" />
<Navigation />
<SkipLinks.Item label="Content" />
<main role="main">{/* The main content of my page */}</main>
</MyView>
Playground
Loading...
SkipLinks props
| Name | Type | Default Value | Description | Usage count |
|---|---|---|---|---|
| children* | ReactNode |