Commit 9a98a03
committed
fix(template-no-aria-label-misuse): normalize whitespace and expand static attr detection
- Trim text-node chars in hasNonEmptyLabelAttr so aria-label=" " (whitespace only)
is treated as empty rather than non-empty.
- Extend getStaticAttrString to return '' for valueless attributes (e.g. <img alt>)
and return the literal value for mustache string-literal paths (e.g. alt={{""}}),
so constraint matching for alt="" → presentation role works correctly.1 parent ee48aec commit 9a98a03
1 file changed
Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
21 | 35 | | |
22 | 36 | | |
23 | 37 | | |
| |||
139 | 153 | | |
140 | 154 | | |
141 | 155 | | |
142 | | - | |
| 156 | + | |
143 | 157 | | |
144 | 158 | | |
145 | 159 | | |
| |||
0 commit comments