Skip to content

fix(z-input): add visual indicator for radio button selection state#636

Open
ada-workbackai wants to merge 2 commits intomasterfrom
workbackai/fix/wcag-1.3.3-radio-selection-indicator
Open

fix(z-input): add visual indicator for radio button selection state#636
ada-workbackai wants to merge 2 commits intomasterfrom
workbackai/fix/wcag-1.3.3-radio-selection-indicator

Conversation

@ada-workbackai
Copy link
Copy Markdown
Contributor

Summary

Fixes WCAG 1.3.3 (Sensory Characteristics) by adding a visual outline indicator to selected radio buttons that does not rely on color alone.

Issue: Radio buttons use custom styling where the selected state is indicated primarily through color change (blue fill vs. outline only). Users with color blindness may not be able to distinguish between selected and unselected radio buttons.

Solution: Added a 2px outline with 2px offset to selected radio buttons using currentColor, providing a visual indicator that works independently of color perception. The outline adapts to disabled states appropriately.

Test Plan

  • Selected radio buttons now display a visible outline around the icon
  • Outline is visible in both normal and disabled states
  • Outline uses currentColor to maintain contrast with the background
  • Focus indicator remains distinct from selection indicator

Evidence

View before/after screenshots and full audit details:
https://app.workback.ai/dashboard/issue/5105/


WCAG Reference:
1.3.3 Sensory Characteristics

Adds an outline to selected radio buttons to provide a non-color
visual indicator of the selection state. This ensures users with
color blindness or using monochrome displays can distinguish
between selected and unselected radio buttons.

The outline uses currentColor to match the text color and includes
proper handling for disabled states.
Addresses stylelint error requiring lowercase CSS color keywords.
@ada-workbackai
Copy link
Copy Markdown
Contributor Author

Fixed stylelint error by changing currentColor to lowercase currentcolor to match the repository's linting rules. CI should pass now.

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