tabable

1.0.0 • Public • Published

Tabable

This is a simple module that will add tab-index attributes to your elements. Build Status

Install

$ npm install tabable

Usage

tabable( element[, filter ] )

Given an element, tabable find all the inputs (or whatever you specify via the optional filter argument) within it an give them a tab-index. Eg:

var tabable = require( 'tabable' );
 
// make all the inputs have a reasonable tab-index
tabable( document.getElementById( 'foo' ) );

Only want textareas to be tabable?

var tabable = require( 'tabable' );
 
// only set tab-index on the textarea elements
tabable( document.getElementById( 'foo' ), 'textarea' );
Have an issue? report it in the issues tab.

Readme

Keywords

Package Sidebar

Install

npm i tabable

Weekly Downloads

12,828

Version

1.0.0

License

MIT

Last publish

Collaborators

  • andyburke