
Usage
If any ID passed into the Skipper.init() object are not present on the current page
they will not show up in the menu.
Installation
npm install @barebones/a11y-skipper --save
JavaScript
import '@barebones/a11y-skipper';
Barebones.skipper.init( {
targetElement: '#a11y-catcher',
primary: ['Skip to content', '#main'],
secondary: ['Skip to search', '#search'],
menu: [
{ label: 'Navigation', id: '#nav' },
{ label: 'Sidebar', id: '#sidebar' },
{ label: 'Footer', id: '#footer' }
],
open: false
} );
CSS
@import url("@barebones/a11y-skipper");
:root {
--c-a11y-skipper-branding: black;
--c-a11y-skipper-branding-inverse: white;
}
HTML
<div id="a11y-catcher">
<a href="#main">skip to content</a>
</div>
<div id="search">Your search stuff here.</div>
<div id="main">Your main content here.</div>