accessible-focus
v1.0.2
Published
Utility used to restrict focus based on parent container.
Downloads
2
Maintainers
Readme
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!