jquery-screenreader-trap v1.0.1
jquery-screenreader-trap
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.
$.trapScreenreader($containerEl);
$.untrapScreenreader();Install
npm install jquery-screenreader-trapEvents
- screenreaderTrap : fired when screenreader trap is activated
- screenreaderUntrap : fired when screenreader trap is deactivated
Dependencies
Development
Run npm start for test driven development. All tests are located in test.js.
Execute npm run to view all available CLI scripts:
npm starttest driven development: watches code and re-tests after any changenpm testruns tests & generates reports (see reports section below)npm run lintlints code for syntax and stylenpm run fixattempts to auto fix style errorsnpm run minifybuilds minified version of codenpm run jsdocgenerates jsdocsnpm run buildminifies code and generates jsdocsnpm run cleandeletes all generated files
The following hooks exist, and do not need to be invoked manually:
npm prepublishcleans, lints, tests and builds on everynpm publishcommandpre-commitcleans, lints, tests and builds on everygit commitcommand
Test Reports
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
JSDocs are generated under ./jsdoc folder.
CI Build
https://travis-ci.org/makeup-jquery/jquery-screenreader-trap
Code Coverage
https://coveralls.io/github/makeup-jquery/jquery-screenreader-trap?branch=master