Repository navigation
🤖 fix: dark-theme accent text uses a text-only token that meets WCAG AA - #6465
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
fbb3429 to
a93fa03
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a93fa03cae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
a93fa03 to
db55799
Compare
|
Perf gate: CLEARED at I checked these facts myself:
Note for the Option C lane (3a0e3b5674): it is working on the PR 4b shell-parity precondition in A new head needs a new clearance. Generated with |
|
Readiness record for head
Reason for stopping: all gates are clean on the exact head, and the review cap is reached. Generated with |
Fixes coder#6449 ## Summary Light-theme accent text now meets WCAG AA (4.5:1) on every light surface. The light theme's `--color-accent-text` (added in coder#6465) gets its own value: `hsl(207 90% 35%)` (`#0961aa`). It keeps the accent's hue and saturation, a little darker. `--color-accent` (`hsl(207 90% 42%)`, `#0b75cb`) stays the button fill, focus ring and tint source. Flexoki-light already passed everywhere, so it keeps `var(--color-accent)`. ## Background A Storybook crawl (574 of 731 stories) found 92 light-theme accent texts below AA in 49 stories. The worst place is the selected-row tint, for example the selected Settings section. | Surface | Color | Before (`#0b75cb`) | After (`#0961aa`) | | --- | --- | --- | --- | | selected tint | `#c8dff3` | 3.46 | 4.64 | | selected tint (lighter) | `#cee3f5` | 3.60 | 4.82 | | `--color-surface-tertiary` | `#e4e4e7` | 3.74 | 5.01 | | update badge tint | `#dbeaf7` | 3.87 | 5.19 | | `--color-hover` | `#e5ebf0` | 3.95 | 5.29 | | `--color-background-secondary` | `#eef2f7` | 4.23 | 5.66 | | white | `#ffffff` | 4.75 | 6.36 | **Why this value:** the smallest darkening at the same hue and saturation that passes everywhere is about 35.7% lightness (4.50:1 on `#c8dff3`, right at the limit), so a one-step rendering difference could tip it under. At 35%, the worst case is 4.64:1. With the new value, the crawl finds 0 failing light accent texts. Flexoki-light had 0 before and still has 0. The selected tint (`bg-accent/20`) comes from `--color-accent`, so it does not change. ## Validation - New `App/LightThemeTokenContrast/AccentLinksLight` and `AccentLinksFlexokiLight` stories check markdown links and the selected Settings section. The dark pair from coder#6465 shares the same play. - `App/OnboardingWizard` now checks the gateway step's links in every theme, not only the dark themes. Before the change (pre-fix failing evidence): ``` ● App/LightThemeTokenContrast › AccentLinksLight expected 'selected Settings section 3.46:1 "Gen…' to be '' ``` After: 26 of 26 pass in the contrast file and 4 of 4 in the wizard file. Screenshots (left: main, right: this PR; light changes, dark unchanged. At 1280 px the sheet shows the Settings nav, where the worst case is; at 390 px it shows a chat with markdown links):  ## Risks Low. One token value in the light theme. Every light-theme accent-colored text and markdown link gets slightly darker. Buttons, focus rings and tints do not change. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high` • Cost: `$181.24`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high costs=181.24 -->
Fixes #5946
Summary
Dark-theme accent text now meets WCAG AA (4.5:1). The PR adds a text-only token,
--color-accent-text: dark#1a98ff, flexoki-dark Flexoki blue-300#66a0c8. Light and flexoki-light keepvar(--color-accent). Alltext-accent/hover:text-accentuses and markdown links (.markdown-content a) move to it. Buttons, focus rings and accent tints keep--color-accent. The user chose this option (B) on the status page.Background
--color-accentis also the primary-button fill (white on it: 5.01:1 in dark), so a lighter accent would break button text. A Storybook crawl (574 of 731 stories) found 259 darktext-accentelements below AA in 90 stories: 3.36:1 on dialogs (#1d1d1d) and 3.97:1 on the main surface. It found 62 flexoki-dark elements in 45 stories (3.79:1 on hover, 3.87:1 for the selected Settings section). With the new token, the crawl finds 0 in both themes.#09090b#1d1d1d#2e2e2e#100f0f#282726Implementation
--color-accent-textis defined in all four themes, each with a WCAG comment. The dark value lives intheme-dark.css, which the VS Code webview also imports.text-accentbecomestext-accent-texteverywhere it stands alone (120 uses in 47 files, including the hover and focus variants and the server-rendered first-run view copy,firstRunView.ts, which must match the live wizard). Classes that already had a suffix (text-accent-foreground,text-accent-light,bg-accent,ring-accent) do not change..markdown-content auses the new token.--color-background-secondary). That is a separate decision, tracked in 🤖 a11y: light-theme accent text is below AA on secondary and hover surfaces (4.23, 3.95) #6449.Validation
App/LightThemeTokenContrast/AccentLinksDarkandAccentLinksFlexokiDarkstories check markdown links in a chat and the selected Settings section.App/OnboardingWizardDark and FlexokiDark now also check the four links on the gateway step.Before the change (pre-fix failing evidence):
After (rebased on main with #6455 and #6459): 24 of 24 pass in the contrast file and 4 of 4 in the wizard file.
tests/ui/onboarding(first-run view parity and both handoffs, 14 tests) andTabLabels.workflows.test.tsxpass.Screenshots (left: main, right: this PR; light unchanged, dark, flexoki-dark):
Risks
Low to medium in reach, low in logic. Every accent-colored text and markdown link in the dark themes gets lighter: Settings sections, the onboarding wizard, model and thinking selectors, workflow views, the review panel, the title bar. A missed
text-accentwould keep the old dark blue:rg -P '(?<![\w-])text-accent(?![\w-])' srcnow finds none.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$177.54