Giter Site home page Giter Site logo

fabiocaccamo / tabbo.js Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 24 KB

:chocolate_bar: :keyboard: enhanced keyboard tabbing usability on any website / webapp with one line of code.

License: MIT License

JavaScript 100.00%
accessibilty application browser focus keyboard navigation tab tabbed tabbing tabindex

tabbo.js's Introduction

tabbo.js

๐Ÿซ โŒจ๏ธ enhanced keyboard tabbing usability on any website / webapp with one line of code.

Table of contents

Features

  • Vanilla JS / Zero dependencies
  • Preserved default tabindex behaviour
  • Tabbing enabled on the following elements: 'a', 'button', 'input', 'select', 'summary', 'textarea', '[tabindex]' (any element with tabindex attribute)
  • 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 Shift key is pressed
  • Looped tabbing when reaching the last focusable element
  • Checkboxes can be checked/unchecked using Enter key

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.git
  • npm install

Watch

  • npm run watch

Build

  • npm run build

Security

Refer to SECURITY.md

License

Released under MIT License.

tabbo.js's People

Contributors

dependabot[bot] avatar fabiocaccamo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.