Commit 8f4d839
committed
fix(material/select): don't announce selected value multiple times
Screen readers announce the selected value multiple times. NVDA e.g. reads "Favorite food Pizza Pizza combobox Pizza collapsed".
1. First, the Screen Reader (SR) reads the value of the label (see 1st `aria-labelledby`): "Favorite food"
2. SR reads the content of the combobox: "Pizza"
3. SR reads the value of the combobox (see 2nd `aria-labelledby`): "Pizza"
4. SR reads the content of the combobox again: "Pizza"
To fix this, an `aria-hidden` attribute is added to the element containing the selected value. NVDA e.g. now reads "Favorite food Pizza combobox collapsed"1 parent 567be4f commit 8f4d839
File tree
2 files changed
+2
-2
lines changed- src
- material-experimental/mdc-select
- material/select
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments