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.
The allowed roles for checkbox input say:
It's a little unclear whether
<input type="checkbox" aria-pressed="true" ... >
can only haverole="button"
, or if it could have any ofrole=button
,menuitemcheckbox
,option
orswitch
.Turns out only
button
role would be allowed on a checkbox input with aria-pressed.Hopefully, the following wording makes this clearer: