Skip to content
This module restricts screen reader virtual cursor to a single subtree in the DOM.
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
src
test
.eslintrc
.gitignore
.npmrc
.travis.yml
LICENSE
README.md
babel.config.json
browser.json
index.js
karma.conf.js
package.json
util.js
webpack.docs.js
yarn.lock

README.md

makeup-screenreader-trap

Build Status Coverage Status Dependency status devDependency status

A vanilla JavaScript port of jquery-screenreader-trap.

This module restricts screen reader virtual cursor to a single subtree in the DOM. This behaviour is useful when implementing a modal interface (e.g. a modal dialog).

const screenreaderTrap = require('makeup-screenreader-trap');

// trap an element
screenreaderTrap.trap(document.querySelector('el'));

// untrap the current trapped element
screenreaderTrap.untrap();

Experimental

This CommonJS module is still in an experimental state, until it reaches v1.0.0 you must consider all minor releases as breaking changes. Patch releases may introduce new features, but will be backwards compatible.

Install

// via npm
npm install makeup-screenreader-trap

// via yarn
yarn add makeup-screenreader-trap

Events

  • screenreaderTrap : fired by trapped element when screenreader trap is activated
  • screenreaderUntrap : fired by trapped element when screenreader trap is deactivated

Dependencies

CI Build

https://travis-ci.org/makeup-js/makeup-screenreader-trap

Code Coverage

https://coveralls.io/github/makeup-js/makeup-screenreader-trap?branch=master

You can’t perform that action at this time.