Skip to content

feat: implement WCAG-compliant high-contrast theme (#778) - #793

Merged
Nanle-code merged 1 commit into
Nanle-code:masterfrom
Marvelg256:a11y/778-high-contrast-theme
Jul 29, 2026
Merged

feat: implement WCAG-compliant high-contrast theme (#778)#793
Nanle-code merged 1 commit into
Nanle-code:masterfrom
Marvelg256:a11y/778-high-contrast-theme

Conversation

@Marvelg256

Copy link
Copy Markdown
Contributor
  • Add CSS custom property overrides for [data-high-contrast="true"] in both dark and light themes, with a fallback for missing data-theme
  • Enhanced forced-colors media query for system-level high-contrast mode
  • Add CHART_COLORS_HIGH_CONTRAST and CHART_COLORS_HIGH_CONTRAST_LIGHT frozen palettes for chart components with >= 7:1 contrast ratios
  • Add STATUS_COLORS / STATUS_COLORS_HIGH_CONTRAST and getStatusColors() helper for semantic status indicators
  • Add getChartColors(isHighContrast, theme) resolver for automatic palette selection based on current theme + accessibility state
  • Write 32 comprehensive tests: primary flow (8), WCAG compliance (9), boundary cases (6), failure cases (7), state transitions (2)
  • Add developer documentation in docs/HIGH_CONTRAST_THEME.md with architecture, usage, contrast ratios, and migration guidance

Closes #778

- Add CSS custom property overrides for [data-high-contrast="true"]
  in both dark and light themes, with a fallback for missing data-theme
- Enhanced forced-colors media query for system-level high-contrast mode
- Add CHART_COLORS_HIGH_CONTRAST and CHART_COLORS_HIGH_CONTRAST_LIGHT
  frozen palettes for chart components with >= 7:1 contrast ratios
- Add STATUS_COLORS / STATUS_COLORS_HIGH_CONTRAST and getStatusColors()
  helper for semantic status indicators
- Add getChartColors(isHighContrast, theme) resolver for automatic
  palette selection based on current theme + accessibility state
- Write 32 comprehensive tests: primary flow (8), WCAG compliance (9),
  boundary cases (6), failure cases (7), state transitions (2)
- Add developer documentation in docs/HIGH_CONTRAST_THEME.md with
  architecture, usage, contrast ratios, and migration guidance

Closes Nanle-code#778
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Marvelg256 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Nanle-code
Nanle-code merged commit 6ba2a28 into Nanle-code:master Jul 29, 2026
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.

[2026 Accessibility] Add a tested high-contrast theme

2 participants