Installation
Installing via NPM
To install OpenKeyNav using npm, run the following command in your terminal:
npm install openkeynav
Then, you can import and use it in your JavaScript file:
import OpenKeyNav from 'openkeynav';
const openKeyNav = new OpenKeyNav();
openKeyNav.init();
Including the Script from a CDN
If you prefer not to use npm, you can include OpenKeyNav directly from a CDN. Add the following script tag to your HTML file:
<script src="https://cdn.jsdelivr.net/npm/openkeynav/dist/openkeynav.umd.min.js"></script>
After including the script, you can initialize OpenKeyNav like this:
<script>
const openKeyNav = new OpenKeyNav();
openKeyNav.init();
</script>
This setup allows you to quickly get started with OpenKeyNav and begin enhancing the keyboard accessibility of your website.