dequelabs / axe-core

Accessibility engine for automated Web UI testing
https://www.deque.com/axe/
Mozilla Public License 2.0
5.9k stars 772 forks source link

aria-conditional-attr correct for checkbox, but silent on radios #4416

Open scottaohara opened 5 months ago

scottaohara commented 5 months ago

The aria-conditional-attr correctly identifies when the aria-checked attribute is used on a native checkbox - and while that's the primary example that had been discussed per the creation of this rule, the same failure should be called out if someone does <input type=radio aria-checked=...> since it results in the same situation of the ARIA attribute not necessarily matching the state of the html input.

The bit we added to ARIA in HTML about this was worded to be for both input types:

Authors MUST NOT use the aria-checked attribute on any element where the checkedness, or the indeterminate checked value of the element can be in opposition to the current value of the aria-checked attribute.

straker commented 5 months ago

Thanks for letting us know