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

Is reporting radio buttons with required attribute as errors not counter to HTML spec? #32

Open
alanfluff opened this issue Apr 12, 2023 · 3 comments
Labels
bug Something isn't working rules engine

Comments

@alanfluff
Copy link

alanfluff commented Apr 12, 2023

Auditing a page with a set of radios using required, i.e.: <input type="radio" ... required> results in ARC Toolkit reporting errors (e.g. below), yet the HTML spec notes:

To avoid confusion as to whether a radio button group is required or not, authors are encouraged to specify the attribute on all the radio buttons in a group.

ARC Toolkit error example

2 Error(s) aria-required or required attribute on radio button
Description: The aria-required or required attribute is used on a radio button.
WCAG 2.1 Success Criterion:A 3.3.2 Labels or Instructions

Unless I have interpreted the spec' incorrectly, should ARC Toolkit not allow the required` attribute on radios without flagging errors?

  • ARC Toolkit Chrome Extension v5.5.3
  • Chrome 111.0.5563.147 on Windows 10
@stevefaulkner
Copy link

@alanfluff You are correct, aria-required is not allowed on role=radio, but required is allowed on input type="radio"

@ferllings @poorgeek this is a bug

@stevefaulkner stevefaulkner added the bug Something isn't working label Apr 21, 2023
@ferllings
Copy link
Member

This is 'old' rule. I'm going to deprecate it and create a new rule to handle aria-required not allowed on role=radio

@alanfluff
Copy link
Author

This is 'old' rule. I'm going to deprecate it and create a new rule to handle aria-required not allowed on role=radio

I assume your change will include no longer marking an error when the the HTML5 required attribute is present on a radio input.

Also, if your UI allows for it, it would be useful to note the recommendation about required being on all radios in the same group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rules engine
Projects
None yet
Development

No branches or pull requests

3 participants