w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
179 stars 48 forks source link

Clarify allowed roles for checkbox input with aria-pressed #314

Closed carmacleod closed 3 years ago

carmacleod commented 3 years ago

The allowed roles for checkbox input say:

Roles: button (when used with aria-pressed), menuitemcheckbox, option or switch.

It's a little unclear whether <input type="checkbox" aria-pressed="true" ... > can only have role="button", or if it could have any of role=button, menuitemcheckbox, option or switch.

Turns out only button role would be allowed on a checkbox input with aria-pressed.

Hopefully, the following wording makes this clearer:

Roles: menuitemcheckbox, option or switch; button if used with aria-pressed.