Commit 8fc6f6d
committed
fix(template-no-redundant-role): lowercase role; add <select>→combobox mapping
Two changes.
1. Compare role tokens case-insensitively. ARIA role values are
ASCII-case-insensitive (HTML-AAM inherits HTML's attribute-comparison
semantics). Before: <body role="DOCUMENT"> was not flagged because
"DOCUMENT" didn't match "document" in ROLE_TO_ELEMENTS.
2. Add 'combobox' → ['select'] mapping. <select> without `multiple` or
`size > 1` has an implicit role of "combobox" per HTML-AAM §4.1.
Before: <select role="combobox"> was silently accepted as a redundant
role.
Two new invalid tests cover the fixes.1 parent 24882a3 commit 8fc6f6d
2 files changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
128 | | - | |
| 131 | + | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
246 | 258 | | |
247 | 259 | | |
248 | 260 | | |
| |||
0 commit comments