JSPM

accessible-focus

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q35219F
  • License MIT

Utility used to restrict focus based on parent container.

Package Exports

  • accessible-focus

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (accessible-focus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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!