Skip to content

🤖 fix: dark-theme accent text uses a text-only token that meets WCAG AA - #6465

Merged
ThomasK33 merged 2 commits into
mainfrom
fix/5946-accent-text-token
Oct 14, 2026
Merged

ThomasK33 merged 2 commits into
mainfrom
fix/5946-accent-text-token

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

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 keep var(--color-accent). All text-accent / hover:text-accent uses 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-accent is 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 dark text-accent elements 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.

Theme Surface Before After
dark main #09090b 3.97 6.61
dark dialog #1d1d1d 3.36 5.60
dark modal #2e2e2e 2.71 4.51
flexoki-dark main #100f0f 4.86 6.77
flexoki-dark hover #282726 3.79 5.27

Implementation

  • --color-accent-text is defined in all four themes, each with a WCAG comment. The dark value lives in theme-dark.css, which the VS Code webview also imports.
  • The class change is mechanical: text-accent becomes text-accent-text everywhere 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 a uses the new token.
  • Light-theme accent text has its own gap (4.23:1 on --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

  • New App/LightThemeTokenContrast/AccentLinksDark and AccentLinksFlexokiDark stories check markdown links in a chat and the selected Settings section.
  • App/OnboardingWizard Dark and FlexokiDark now also check the four links on the gateway step.

Before the change (pre-fix failing evidence):

● App/LightThemeTokenContrast › AccentLinksDark
    expected 'markdown link 3.97:1 "setup guide"\nm…' to be ''
● App/LightThemeTokenContrast › AccentLinksFlexokiDark
    expected 'selected Settings section 3.87:1 "Gen…' to be ''
● App/OnboardingWizard › Dark
    expected '3.36:1 "Coder"\n3.36:1 "Discord"\n3.3…' to be ''

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) and TabLabels.workflows.test.tsx pass.

Screenshots (left: main, right: this PR; light unchanged, dark, flexoki-dark):

Desktop 1280 px

Phone 390 px

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-accent would keep the old dark blue: rg -P '(?<![\w-])text-accent(?![\w-])' src now finds none.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $177.54

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T08:39:48.121297Z db55799 New commits
🔒 Security Review ✅ Completed 2026-10-14T08:40:21.556956Z db55799 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ThomasK33
ThomasK33 force-pushed the fix/5946-accent-text-token branch from fbb3429 to a93fa03 Compare October 14, 2026 08:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/features/Settings/Sections/MCPSettingsSection.tsx Outdated
@ThomasK33
ThomasK33 force-pushed the fix/5946-accent-text-token branch from a93fa03 to db55799 Compare October 14, 2026 08:37
@ThomasK33

Copy link
Copy Markdown
Member Author

Perf gate: CLEARED at db55799186c3f17e11c8575d2e04dd358cadbfd8 (perf owner, workspace 8e18f4aada).

I checked these facts myself:

  1. The head matches git ls-remote. The merge-base is f941ddbc83. The PR has 52 files, +208/-122.
  2. The product diff is class swaps (text-accent -> text-accent-text) plus one new custom property, --color-accent-text, in globals.css and theme-dark.css. The PR adds no imports, hooks, listeners or timers to non-test, non-story code.
  3. src/node/orpc/firstRunView.ts, the static first-run view for Option C, changes the same 5 classes as OnboardingWizardSplash.tsx, so the static view and the live first paint stay in sync.

Note for the Option C lane (3a0e3b5674): it is working on the PR 4b shell-parity precondition in firstRunView.ts. If this PR lands first, that lane rebases onto it and reruns make first-run-view-parity.

A new head needs a new clearance.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

@ThomasK33

Copy link
Copy Markdown
Member Author

Readiness record for head db55799186c3f17e11c8575d2e04dd358cadbfd8 (rebased on main f941ddbc83, which includes #6455 and #6459):

  1. CI: Required passes, and the full check set passed on this head. Pixel / Review waits for a human visual review: the dark accent text changes many snapshots, which is expected.
  2. Codex: 6 review assessments used, which is the cap. Normal and security on fbb3429 were clean. On a93fa03 there was one P2 finding: the MCP "Add server" hover faded to 80% (4.02:1). I fixed it in db55799186 with hover:underline, replied, and resolved the thread. On db55799 both were clean. Open threads: 0.
  3. Perf gate: CLEARED at this head by the perf owner (comment above).
  4. Independent final check (fresh-context sub-agent): ready with tracked follow-ups. No standalone text-accent and no text-accent-text/NN is left in src. The token is defined in 4 themes. The first-run copy matches the wizard.
  5. Follow-up: 🤖 a11y: light-theme accent text is below AA on secondary and hover surfaces (4.23, 3.95) #6449 (light-theme accent text, a separate token decision).

Reason for stopping: all gates are clean on the exact head, and the review cap is reached.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $180.67

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit d6a65f8 Oct 14, 2026
32 of 33 checks passed
@ThomasK33
ThomasK33 deleted the fix/5946-accent-text-token branch October 14, 2026 11:00
yermakoffivan pushed a commit to yermakoffivan/mux that referenced this pull request Oct 14, 2026
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):

![Light and dark, 1280 px and 390
px](https://github.com/user-attachments/assets/d78b9d7c-516b-4a9d-a414-5891f2f1684e)

## 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 -->
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.

🤖 a11y: dark-theme accent links have 3.36:1 contrast (below 4.5:1)

1 participant