Skip to content

fix(aria-conditional-attr): add support for radio#5100

Merged
straker merged 1 commit into
dequelabs:developfrom
mehm8128:fix/add-radio-to-aria-conditional-attr
May 13, 2026
Merged

fix(aria-conditional-attr): add support for radio#5100
straker merged 1 commit into
dequelabs:developfrom
mehm8128:fix/add-radio-to-aria-conditional-attr

Conversation

@mehm8128
Copy link
Copy Markdown
Contributor

@mehm8128 mehm8128 commented May 12, 2026

added support for radio for aria-conditional-attr as well as checkbox.

Closes: #4416

Add support for aria-checked on radios in the aria-conditional-attr rule.

Closes issue dequelabs#4416
Copilot AI review requested due to automatic review settings May 12, 2026 11:57
@mehm8128 mehm8128 requested a review from a team as a code owner May 12, 2026 11:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-checked conflicts 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.

Copy link
Copy Markdown
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr! Looks great.

Reviewed for security

@straker straker merged commit 8223c98 into dequelabs:develop May 13, 2026
27 of 29 checks passed
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

Successfully merging this pull request may close these issues.

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

3 participants