Skip to content
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

Should role-supports-aria-props fail when role is checkbox and aria-required is set? #716

Closed
acostalima opened this issue Jun 24, 2020 · 2 comments
Assignees

Comments

@acostalima
Copy link

acostalima commented Jun 24, 2020

ARIA's specification for aria-required leads me to believe so but I'm not an expert in the matter. The following example was failing on v6.2.3 and on v6.3.1 it's not anymore:

<span role="checkbox" aria-checked="false" aria-required />
@jessebeach
Copy link
Collaborator

@acostalima it was failing because we didn't have the prop explicitly listed in our allowed props. As of the new version it is.

Unlike HTML, the presence of an ARIA attribute does not endow it with a truthy value. You need to explicitly assign it a value of "true" or "false":

True/False: Value representing either true or false. The default value for this value type is false unless otherwise specified.
--https://www.w3.org/TR/wai-aria/#valuetype_true-false

Keep in mind that an individual checkbox can be required, but not an individual radio. Only a radiogroup can be required: https://www.w3.org/TR/wai-aria-1.2/#radiogroup

@acostalima
Copy link
Author

@jessebeach thanks for the clarification!

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

No branches or pull requests

2 participants