-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(autocomplete): improve implementation of aria-activedescendant #11743
Conversation
a2152a9
to
8876826
Compare
There are some e2e failures in g3 due to certain DOM lookups no longer returning results. It may be due to the change to There are also other unit test failures that need to be investigated. I can probably mitigate these issues once they are more clearly defined and communicated. |
8876826
to
6e1c20e
Compare
Rebased. |
I've redeployed these changes to https://angularjs-material.firebaseapp.com/demo/autocomplete. I had recently deployed some |
6e1c20e
to
264182d
Compare
Received feedback on this based on JAWS testing that scrolling of the options list should wrap. Opened #11766 to track that issue separate from this PR. |
Received feedback on this based on JAWS testing that the default Escape key behavior did not align with expectations. Noted that we do have the I've updated all of the demos to use |
- allow screen readers to do more and us to do less - remove extra calls to announce the item that is visually focused - remove tests for these extra live announcements - give every option an id for use with `aria-activedescendant` - use the `selected` class for styling and finding the active option - implement recommendations from a11y guides - add the clear button to the tab order - change input type to `text` - always define a `name` attribute - when the popup isn't expanded - `aria-owns` and `aria-activedescendant` shouldn't be defined - when the autocomplete is disabled - `aria-autocomplete` and `aria-role` shouldn't be defined - `aria-haspopup` should be false - add md-autocomplete-suggestion class for styling instead of using `li` - add `md-autoselect` to the dialog demo for help w/ manual testing - remove overly verbose `aria-describedby` from basic demo - mark `md-icons` in `md-item-templates` of autocomplete demos as hidden - update demos to use `md-escape-options="clear"` for better a11y Fixes #11742
264182d
to
1a51f24
Compare
It looks like the remaining presubmit issues can be handled within g3, then this will be able to get merged. |
- allow screen readers to do more and us to do less - remove extra calls to announce the item that is visually focused - remove tests for these extra live announcements - give every option an id for use with `aria-activedescendant` - use the `selected` class for styling and finding the active option - implement recommendations from a11y guides - add the clear button to the tab order - change input type to `text` - always define a `name` attribute - when the popup isn't expanded - `aria-owns` and `aria-activedescendant` shouldn't be defined - when the autocomplete is disabled - `aria-autocomplete` and `aria-role` shouldn't be defined - `aria-haspopup` should be false - add md-autocomplete-suggestion class for styling instead of using `li` - add `md-autoselect` to the dialog demo for help w/ manual testing - remove overly verbose `aria-describedby` from basic demo - mark `md-icons` in `md-item-templates` of autocomplete demos as hidden - update demos to use `md-escape-options="clear"` for better a11y Fixes #11742 (cherry picked from commit 8c159aa)
PR Checklist
Please check that your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
ChromeVox announces the following when the user changes to the
Alaska
optionWhen it should announce something like
Issue Number:
Fixes #11742
What is the new behavior?
aria-activedescendant
selected
class for styling and finding the active optiontext
name
attributearia-owns
andaria-activedescendant
shouldn't be definedaria-autocomplete
andaria-role
shouldn't be definedaria-haspopup
should be falsemd-autocomplete-suggestion
class for styling instead of usingli
md-autoselect
to the dialog demo for help w/ manual testingaria-describedby
from basic demomd-icons
inmd-item-templates
of autocomplete demos as hiddenDoes this PR introduce a breaking change?
Other information
Related resources
Live demo:
https://angularjs-material.firebaseapp.com/demo/autocomplete