@@ -128,13 +128,13 @@ ruleTester.run('audit:role-has-required-aria (gts)', rule, {
128128 errors : [ { messageId : 'missingAttributes' } ] ,
129129 } ,
130130
131- // === DIVERGENCE — undocumented input+role pairings ===
132- // Pairings NOT on our whitelist remain flagged. jsx-a11y/angular defer to
133- // axobject-query's `elementAXObjects`, which covers a larger set; we only
134- // recognize the documented five pairings. Example mismatches:
135- // - input[type=checkbox] role=radio → we flag, jsx-a11y/angular don't
136- // - input[type=radio] role=switch → we flag, peer behavior varies
137- // These remain invalid ( missing aria-checked) in our rule .
131+ // === Pairings NOT exempt — axobject-query does not list them ===
132+ // Semantic-role exemption is driven by axobject-query's `elementAXObjects`
133+ // + `AXObjectRoles` maps — see `isSemanticRoleElement()` in the rule
134+ // source. Pairings the AX-tree data does not list (such as
135+ // ` input[type=checkbox] role=radio` or `input[type=radio] role=switch`)
136+ // fall through to the normal required-attribute check and are flagged
137+ // for missing ` aria-checked` .
138138 {
139139 code : '<template><input type="checkbox" role="radio" /></template>' ,
140140 output : null ,
@@ -145,8 +145,9 @@ ruleTester.run('audit:role-has-required-aria (gts)', rule, {
145145 output : null ,
146146 errors : [ { messageId : 'missingAttributes' } ] ,
147147 } ,
148- // Bare `<input role="switch">` (no `type`) — not on our whitelist, stays
149- // flagged. The input's default `type=text` does not expose aria-checked.
148+ // Bare `<input role="switch">` (no `type`) has no exempt pairing either —
149+ // the element defaults to `type=text`, which axobject-query does not map
150+ // to the switch role.
150151 {
151152 code : '<template><input role="switch" /></template>' ,
152153 output : null ,
0 commit comments