fix(aria-conditional-attr): add support for radio#5100
Merged
straker merged 1 commit intoMay 13, 2026
Conversation
Add support for aria-checked on radios in the aria-conditional-attr rule. Closes issue dequelabs#4416
Contributor
There was a problem hiding this comment.
Pull request overview
Extends the aria-conditional-attr check to also validate aria-checked usage on native input[type="radio"], matching the existing behavior for native checkboxes and addressing #4416.
Changes:
- Added a radio-specific evaluator to flag cases where
aria-checkedconflicts with a native radio’s checked state. - Added unit + integration + virtual-rule coverage for the new radio behavior.
- Added a new localized failure message key (
fail.radio) for the check.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
lib/checks/aria/aria-conditional-radio-attr-evaluate.js |
New evaluator implementing aria-checked consistency checks for native radios. |
lib/checks/aria/aria-conditional-attr-evaluate.js |
Routes role radio to the new radio evaluator. |
lib/checks/aria/aria-conditional-attr.json |
Adds the fail.radio message string for the check’s built-in metadata. |
locales/_template.json |
Adds the fail.radio message key to the locale template. |
locales/ja.json |
Adds the Japanese translation for the new fail.radio message key. |
test/checks/aria/aria-conditional-attr.js |
Adds unit tests for native radio scenarios (checked/unchecked + mismatches). |
test/integration/virtual-rules/aria-conditional-attr.js |
Adds virtual-rule integration coverage for radio pass/fail cases. |
test/integration/rules/aria-conditional-attr/aria-conditional-attr.html |
Adds radio fixtures for pass/fail coverage. |
test/integration/rules/aria-conditional-attr/aria-conditional-attr.json |
Updates expected pass/violation node lists to include the new radio fixtures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
straker
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added support for radio for
aria-conditional-attras well as checkbox.Closes: #4416