Skip to content

Fix radio button checked state visibility in forced-colors mode#3929

Draft
rickreyhsig wants to merge 1 commit intomainfrom
rickreyhsig-patch-1
Draft

Fix radio button checked state visibility in forced-colors mode#3929
rickreyhsig wants to merge 1 commit intomainfrom
rickreyhsig-patch-1

Conversation

@rickreyhsig
Copy link

@rickreyhsig rickreyhsig commented Feb 10, 2026

Authors: Please fill out this form carefully and completely.

Reviewers: By approving this Pull Request you are approving the code change, as well as its deployment and mitigation plans.
Please read this description carefully. If you feel there is anything unclear or missing, please ask for updates.

What are you trying to accomplish?

Fix radio button checked state visibility under Windows High Contrast themes (forced-colors mode). Currently, .FormControl-radio has a @media (forced-colors: active) block that styles only the base (unchecked) state with canvastext. Since the radio uses appearance: none and relies on border-width changes for the checked indicator, both states appear identical under forced-colors because the browser overrides custom colors.

This adds a @media (forced-colors: active) rule inside &:checked using the SelectedItem system color, mirroring the existing pattern used by .FormControl-checkbox:checked.

Screenshots

Integration

List the issues that this change affects.

Closes https://github.com/github/accessibility-audits/issues/9855

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.

What approach did you choose and why?

Used the SelectedItem system color for the checked state to differentiate it from the unchecked canvastext state. This follows the same pattern already used by .FormControl-checkbox:checked at line 739, which also adds a forced-colors block inside its :checked rule.

Anything you want to highlight for special attention from reviewers?

The unchecked forced-colors block (line 808) uses canvastext. The new checked block uses SelectedItem so the two states are visually distinct. These are CSS system colors defined by the CSS Color Module Level 4 spec.

Accessibility

  • Fixes axe scan violation - This change fixes an existing axe scan violation.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@rickreyhsig rickreyhsig self-assigned this Feb 10, 2026
@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

⚠️ No Changeset found

Latest commit: e2ef8f5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

1 participant