Skip to content

test(aria-allowed-role): cover button element widget roles - #5250

Merged
straker merged 3 commits into
developfrom
chut/4142-input-button-roles
Jul 30, 2026
Merged

test(aria-allowed-role): cover button element widget roles#5250
straker merged 3 commits into
developfrom
chut/4142-input-button-roles

Conversation

@chutchins25

@chutchins25 chutchins25 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Just adds the aria-allowed-role integration cases for the <button> element (separator, slider, treeitem; gridcell was already covered), which is all #4142 needs on top of #4398.

Closes #4142

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 straker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@chutchins25
chutchins25 force-pushed the chut/4142-input-button-roles branch from 15e726f to 12fd2ba Compare July 29, 2026 15:10
@chutchins25
chutchins25 marked this pull request as ready for review July 29, 2026 17:43
@chutchins25
chutchins25 requested a review from a team as a code owner July 29, 2026 17:43
Copilot AI review requested due to automatic review settings July 29, 2026 17:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and treeitem on input type="button".
  • Add/extend unit, integration, and virtual-rule coverage to ensure aria-allowed-role and getElementUnallowedRoles treat these roles as allowed for input 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.

@chutchins25
chutchins25 marked this pull request as draft July 29, 2026 20:18
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
@chutchins25

Copy link
Copy Markdown
Contributor Author

Done — reworked to just add the aria-allowed-role integration cases for the <button> element (separator, slider, treeitem; gridcell was already covered), which is all #4142 needs on top of #4398. Reverted the input type="button" role additions and dropped their unit/virtual-rule tests, since the issue is about the button element.

@chutchins25 chutchins25 changed the title fix(aria-allowed-role): allow recommended roles on input type=button test(aria-allowed-role): cover button element widget roles Jul 30, 2026
@chutchins25
chutchins25 dismissed straker’s stale review July 30, 2026 14:50

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.

@chutchins25
chutchins25 requested a review from straker July 30, 2026 14:50
@chutchins25
chutchins25 marked this pull request as ready for review July 30, 2026 14:50
@straker
straker merged commit 1181932 into develop Jul 30, 2026
25 checks passed
@straker
straker deleted the chut/4142-input-button-roles branch July 30, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

role="separator" not allowed on button via aria-allowed-role

3 participants