release: v0.3.4 — forced-colors hover/contrast fixes#173
Merged
Conversation
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>
Deploying apg-patterns-examples with
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
var(--foreground),color-mix(...)) underforced-color-adjust: nonenow use system colors explicitly.hover/[aria-selected='true']switched fromHighlight+HighlightText(which rendered labels as solid black blocks in Chromium dark forced-colors) to outline-based indication — matches the existingprefers-contrast: highpattern in the same file.ButtonFace/ButtonTextfor the same readability reason.Test plan
/patterns/checkbox/{react,vue,svelte,astro}/with PlaywrightemulateMedia({ forcedColors: 'active', colorScheme: 'dark' })and confirm:Highlight(cyan), not the dim base colorHighlightGrayText/patterns/radio-group/...and/patterns/switch/...(border / track becomesHighlighton hover)/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.npm run test:e2e:pattern --pattern=checkbox/radio-group/switch/combobox/accordionall pass.npm run lintpasses.🤖 Generated with Claude Code