This Ember addon provides a {{focusing-outlet}}
component which you can use in place of normal {{outlet}}
s.
The current implementation of this addon will immediately apply focus to the most relevant piece of content based on actions users take (clicking buttons, links, etc). This allows screen readers to catch changes and read the right information, thus providing a much better experience for blind users.
ember install ember-a11y
In your templates you would then swap in {{focusing-outlet}}
for {{outlet}}
wherever it may occur.
You also need to ensure that your application's router is not set to use locationType: 'hash'
. Set ENV.locationType
appropriately inside of config/environment.js
.
If you are using Ember 2.3.0-beta+
you should add ember-getowner-polyfill
to your blacklist in ember-cli-build.js
:
var app = new EmberAddon(defaults, {
addons: {
blacklist: ['ember-getowner-polyfill']
}
});
Included in this addon is a demo application for testing ember-a11y
.
You can access it through Github Pages or build it from source files with the following steps:
- run
ember server
- Visit the demo app at http://localhost:4200.
Many of the examples in the demo app are meant to be used alongside a screen reader. A few of our suggestions:
- ChromeVox (ChromeOS)
- Also, check out ChromeVox Next
- NVDA (Windows)
npm run test
- Run all tests.npm run demo
- Publish an updated demo app.