-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve screen reader support, ARIA etc #104
Conversation
Add new status class. This is used to assign aria attributes too and inform the user of dynamic element changes
Add aria to typeahead to enhance accessibility
This ensures we still work on older browsers.
Use underscore bind instead of native.
Fixes result count in ARIA status message
Also fix broken promises tests
One note to add, due to This allowed me to upgrade the other dependencies (e.g. newer and better performing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me, and thanks for the accessibility improvements!
@corejavascript/collaborators Can we get another review before we merge this? |
That's great, thanks. Be wary about your other pull requests though, e.g. #54 An auto select feature may interrupt the "use up and down arrow keys to navigate" messaging we're now giving to screen readers. Pressing down may jump to the 2nd result, skipping the 1st one. |
@colinrotherham Thanks for the heads up on that. Perhaps we should add the auto-select feature as an option (not enabled by default), and make a note of the potential issue in the docs. |
Merging this, since we haven't heard from any other reviewers. |
Thanks @jlbooker |
@A6Brgeuka That content is needed for screen readers. It announces that results are available, otherwise it's not obvious. Use the Something like: .visuallyhidden {
position: absolute;
overflow: hidden;
clip: rect(0 0 0 0);
height: 1px;
width: 1px;
margin: -1px;
padding: 0;
border: 0;
} |
The UK Home office (and Department for Work and Pensions) have been maintaining a fork of the old—abandoned—Twitter branch for a little while.
We're using the typeahead in a number of our services for searching for countries. We'd be interested in you pulling in our additional ARIA support for this fork.
It includes these changes:
role="option"
to each suggestion itemrole="listbox"
to the suggestions wrapperrole="combobox"
to the main input fieldaria-activedescendant
on the input each time a suggestion is arrow-keyed etcrole="status"
,aria-live
set to polite)What do you think?