test(aria-allowed-role): cover button element widget roles - #5250
Conversation
Add gridcell, separator, slider and treeitem to the allowed roles of input type=button, matching the button element and ARIA in HTML. Closes #4142
straker
left a comment
There was a problem hiding this comment.
This does not resolve the issue. The issue was for the button element and not the input type=button. Also the only thing that needs to be update for this past the addition to the spec is an integration test for aria-allowed-role (don't need tests for the unit test or the virtual nodes)
15e726f to
12fd2ba
Compare
There was a problem hiding this comment.
Pull request overview
Aligns axe-core’s ARIA role allowance data for input type="button" with ARIA in HTML by adding the missing recommended widget roles so it matches the <button> element’s allowance set.
Changes:
- Update standards data to allow
gridcell,separator,slider, andtreeitemoninput type="button". - Add/extend unit, integration, and virtual-rule coverage to ensure
aria-allowed-roleandgetElementUnallowedRolestreat these roles as allowed forinput type="button".
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/standards/html-elms.js | Adds the four missing recommended roles to the input type="button" variant’s allowedRoles list. |
| test/commons/aria/get-element-unallowed-roles.js | Adds unit tests asserting separator and treeitem are not reported as unallowed for input type="button". |
| test/integration/rules/aria-allowed-role/aria-allowed-role.html | Adds pass-case fixtures for the new allowed roles on input type="button". |
| test/integration/rules/aria-allowed-role/aria-allowed-role.json | Registers the new fixtures as expected passes for the aria-allowed-role integration test. |
| test/integration/virtual-rules/aria-allowed-role.js | Adds a virtual-rule test ensuring role="separator" passes on input type="button". |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The button element already allows gridcell, separator, slider and treeitem (added in #4398); add the missing aria-allowed-role integration cases for them. Per review, #4142 concerns the button element rather than input type=button, so this reverts the earlier input type=button role additions and drops their unit and virtual-rule tests. Closes #4142
|
Done — reworked to just add the |
Dismissing as stale — this predates the rework. Per your review, the PR was reduced to just the aria-allowed-role integration test for the <button> element; the input type="button" change was reverted (html-elms.js has no net change vs develop) and the unit/virtual-rule tests were dropped. Re-requesting review.
Just adds the
aria-allowed-roleintegration cases for the<button>element (separator,slider,treeitem;gridcellwas already covered), which is all #4142 needs on top of #4398.Closes #4142