accessible-focus

1.0.2 • Public • Published

Accessible Focus

This utility developed to improve and restrict focus using tab key.

Installation

npm install typescript -g
npm install
npm start

Restrict focus

Restrict focus on any container. It will helps to stay focus on predefined focus elements. It does not includes [aria-hidden]="true" atributes elements.

Usage

To initiate focus in container.

var ao = new aoFocus("form"); //set container for focus

To unset focus.

ao.cleanFocus(); // it will unset focus from last set container.

To add excluded elements

ao.excludeElements([".exclude","[aria-disabled]"]); // Pass array of elements
ao.initiateFocus(); // Intiate focus again!

Package Sidebar

Install

npm i accessible-focus

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

17.6 kB

Total Files

7

Last publish

Collaborators

  • rsuthar