ATTENTION: A non-jQuery version is now available at makeup-screenreader-trap.
Prevents screen reader's virtual cursor from leaving the confines of a containing element.
Screenreader-trap is a singleton as there can only ever be one active screenreader-trap on a page. Creating a new screenreader-trap will disable the current trap.
npm install jquery-screenreader-trap
- screenreaderTrap : fired when screenreader trap is activated
- screenreaderUntrap : fired when screenreader trap is deactivated
npm start for test driven development. All tests are located in
npm run to view all available CLI scripts:
npm starttest driven development: watches code and re-tests after any change
npm testruns tests & generates reports (see reports section below)
npm run lintlints code for syntax and style
npm run fixattempts to auto fix style errors
npm run minifybuilds minified version of code
npm run jsdocgenerates jsdocs
npm run buildminifies code and generates jsdocs
npm run cleandeletes all generated files
The following hooks exist, and do not need to be invoked manually:
npm prepublishcleans, lints, tests and builds on every
pre-commitcleans, lints, tests and builds on every
Each test run will generate the following reports:
/test_reports/coveragecontains Istanbul code coverage report
/test_reports/htmlcontains HTML test report
/test_reports/junitcontains JUnit test report
JSDocs are generated under