Commit bae2830
fix(material/badge): insert inline description for non-interactive hosts (#27025)
The badge current applies `aria-describedby` to surface the
developer-provided description. However, assistive technology generally
doesn't read these description on non-interactive elements. So, we can
take advantage of our handy `InteractivityChecker` and do something
different if the host is not focusable; we add the description inline as
the next sibling with `.cdk-visually-hidden`.
Fixes #26190
(cherry picked from commit f0a5008)1 parent f09e669 commit bae2830
File tree
4 files changed
+285
-164
lines changed- src
- dev-app/badge
- material/badge
4 files changed
+285
-164
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
0 commit comments