Commit dbfcbad
committed
fix: treat <option> as inherently interactive
Add <option> and <datalist> to INHERENTLY_INTERACTIVE_TAGS in
template-click-events-have-key-events. Both map to widget-descendant
ARIA roles per aria-query's elementRoles (option -> option,
datalist -> listbox), matching jsx-a11y's isInteractiveElement
treatment. Previously, <option {{on "click" h}}> was reported as a
false positive (confirmed via audit fixture B1).
Updates audit/peer-parity.js to move <option> from DIVERGENCE to
parity, and adds <datalist> alongside. <menuitem> is left out: the
HTML element is deprecated and not present in aria-query's
elementRoles, so its interactivity status is ambiguous and warrants
separate discussion.1 parent 5c8a9df commit dbfcbad
3 files changed
Lines changed: 16 additions & 21 deletions
File tree
- lib/rules
- tests
- audit/click-events-have-key-events
- lib/rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
| |||
200 | 199 | | |
201 | 200 | | |
202 | 201 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | 202 | | |
212 | 203 | | |
213 | 204 | | |
| |||
304 | 295 | | |
305 | 296 | | |
306 | 297 | | |
| 298 | + | |
| 299 | + | |
307 | 300 | | |
308 | 301 | | |
309 | 302 | | |
| |||
339 | 332 | | |
340 | 333 | | |
341 | 334 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | 335 | | |
349 | 336 | | |
350 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| |||
0 commit comments