-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create quick list of attributes with aria-* equivalents #492
Comments
Does the HTML attribute win for cases like disabled/required/checked when the attribute is not present? I would have assumed no, but Firefox does this for checked (I guess clearly the input type=checkbox is unchecked when the attribute is not present). On the other hand, Firefox does not do it for disabled/required. Not sure that there's a clear rule here. |
Checked is a tricky case. The absence of the attribute is in itself a value. I'm happy to change that in Firefox, but it seems confusing to me that an unchecked HTML checkbox with aria-checked=true becomes checked, but a checked HTML checkbox with aria-checked=false also becomes checked. We're biased towards checked there. In contrast, disabled and required are more exceptional states that are generally only set in specific circumstances. |
Especially since the state of a checkbox depends only initially on the checked attribute, but changes during the operation of the checkbox, i.e. is completely independent of the attribute in the DOM. That is why the sentence at "checked" is also a bit too complicated and misleading:
Clearer and simpler would be:
|
Per the ARIA spec, when authors specify both the native HTML attribute and the ARIA attribute with the same purpose, the HTML attribute is meant to win.
To help surface exactly which attributes need to be considered here, a quick list of these attributes could be surfaced to make it easier to identify - rather than having to comb through all the HTML attributes, many of which do not expose a11y properties.
The text was updated successfully, but these errors were encountered: