Skip to content

release: v0.3.4 — forced-colors hover/contrast fixes#173

Merged
masuP9 merged 1 commit into
mainfrom
release/v0.3.4
May 13, 2026
Merged

release: v0.3.4 — forced-colors hover/contrast fixes#173
masuP9 merged 1 commit into
mainfrom
release/v0.3.4

Conversation

@masuP9
Copy link
Copy Markdown
Owner

@masuP9 masuP9 commented May 13, 2026

Summary

  • Fix dim/unreadable hover states in Windows High Contrast Mode + dark color-scheme across checkbox, radio-group, switch, combobox, and accordion.
  • Patterns with custom-color hover (var(--foreground), color-mix(...)) under forced-color-adjust: none now use system colors explicitly.
  • Combobox option hover / [aria-selected='true'] switched from Highlight + HighlightText (which rendered labels as solid black blocks in Chromium dark forced-colors) to outline-based indication — matches the existing prefers-contrast: high pattern in the same file.
  • Accordion expanded trigger switched to ButtonFace/ButtonText for the same readability reason.
  • Bumps version to 0.3.4 (patch).

Test plan

  • Open /patterns/checkbox/{react,vue,svelte,astro}/ with Playwright emulateMedia({ forcedColors: 'active', colorScheme: 'dark' }) and confirm:
    • unchecked + hover → border = Highlight (cyan), not the dim base color
    • checked + hover → background stays Highlight
    • disabled + hover → border stays GrayText
  • Same for /patterns/radio-group/... and /patterns/switch/... (border / track becomes Highlight on hover)
  • Open /patterns/combobox/.../ in forced-colors+dark, open the listbox, hover an option → option gets a 2px cyan outline, label remains readable (white text on black background). Verify [aria-selected='true'] shows the same outline.
  • Forced-colors OFF (normal light/dark) — no visual regression on any of the above patterns.
  • npm run test:e2e:pattern --pattern=checkbox / radio-group / switch / combobox / accordion all pass.
  • npm run lint passes.

🤖 Generated with Claude Code

Fix several patterns whose hover/active states became dim or unreadable
in Windows High Contrast Mode with dark color scheme.

- checkbox/radio/switch: hover used var(--foreground) under
  forced-color-adjust:none, which resolved to a near-white custom color
  dimmer than the base ButtonBorder. Add system-color hover overrides
  inside @media (forced-colors: active) using Highlight.
- combobox: option hover and [aria-selected='true'] used Highlight +
  HighlightText, which collapsed to an unreadable label (Chromium's
  forced-colors text painting plus HighlightText==Canvas in dark mode).
  Switch both to outline-based indication, matching the
  prefers-contrast: high pattern already used in this file.
- accordion: expanded trigger now uses ButtonFace/ButtonText instead of
  Highlight/HighlightText for the same readability reason.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying apg-patterns-examples with  Cloudflare Pages  Cloudflare Pages

Latest commit: a026212
Status: ✅  Deploy successful!
Preview URL: https://860b49ca.apg-patterns-examples.pages.dev
Branch Preview URL: https://release-v0-3-4.apg-patterns-examples.pages.dev

View logs

@masuP9 masuP9 merged commit bee6090 into main May 13, 2026
17 checks passed
@masuP9 masuP9 deleted the release/v0.3.4 branch May 13, 2026 06:19
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