This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Commit 8c159aa
fix(autocomplete): improve implementation of aria-activedescen… (#11743)
- 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 #117421 parent e9e4647 commit 8c159aa
File tree
14 files changed
+494
-110
lines changed- src
- components/autocomplete
- demoBasicUsage
- demoCustomTemplate
- demoFloatingLabel
- demoInsideDialog
- demoRepeatMode
- js
- core/util
- test
14 files changed
+494
-110
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
0 commit comments