@fabiocaccamo/tabbo.js
v0.1.1
Published
enhanced keyboard tabbing usability on any website / webapp with one line of code.
Maintainers
Readme
tabbo.js
:chocolate_bar: :keyboard: enhanced keyboard tabbing usability on any website / webapp with one line of code.
Table of contents
Features
- Vanilla JS / Zero dependencies
- Preserved default
tabindexbehaviour - Tabbing enabled on the following elements:
'a','button','input','select','summary','textarea','[tabindex]'(any element withtabindexattribute) - Tabbing disabled on all elements that are disabled (impossible to interact with) or invisible (hidden or without width/height)
- Tabbing disabled on all elements that are children/descendants of elements with tabbing disabled
- Tabbing trapped inside modal elements (any element with
aria-modal="true"attribute that is enabled and visible) - Reversed tabbing order when
Shiftkey is pressed - Looped tabbing when reaching the last focusable element
- Checkboxes can be checked/unchecked using
Enterkey
Installation
This library is available through npm:
npm install @fabiocaccamo/tabbo.js
Usage
CDN
<script src=" https://cdn.jsdelivr.net/npm/@fabiocaccamo/tabbo.js/dist/tabbo.min.js"></script>Local
<script src="node_modules/@fabiocaccamo/tabbo.js/dist/tabbo.min.js"></script>Node
const tabbo = require("@fabiocaccamo/tabbo.js");APIs
The only thing you have to do is activate tabbo as soon as possible:
tabbo.activate();If needed, you can deactivate tabbo at any time:
tabbo.deactivate();Development
Setup
git clone https://github.com/fabiocaccamo/tabbo.js.gitnpm install
Watch
npm run watch
Build
npm run build
Security
Refer to SECURITY.md
License
Released under MIT License.
