Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Appearance Contrast setting does not strengthen highlights, borders, or focus rings #47760

Openakj(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open Settings → Appearance → Interface.
  2. Drag the Contrast slider all the way to 200%.
  3. Check which thread row is selected in the sidebar (especially in light mode).
  4. Open a dropdown menu or the command palette and move through items with the arrow keys or pointer.
  5. Check the edges of dialogs, dropdown menus, the chat composer, and focused controls while pressing Tab.

Expected behavior

Raising Contrast should strengthen the contrast of selected and highlighted rows, control and container borders, and focus rings alongside text — matching the setting's description ("Adjust the contrast of colors and borders across the interface") and helping UI boundaries and states reach WCAG 2.1 SC 1.4.11 (Non-text Contrast, which asks for at least a 3:1 contrast ratio).

Actual behavior

A low vision user who raises Contrast to 200% still cannot easily tell which sidebar row, menu item, or command palette entry is selected or highlighted, where panels and the composer end, or which control has keyboard focus. A low vision user reported that highlighting is hard to see and that the contrast slider didn't behave as expected.

At 200% contrast, body text reaches pure black (light mode) or pure white (dark mode) because --appearance-contrast-boost scales to 100%. By contrast, the visual cues low vision users rely on most barely move or ignore the setting completely:

  • Highlights bypass contrast: Menu highlights, sidebar row states, and command palette highlights do not use the contrast-adjusted mix. A contrast-aware --contrast-accent token already exists in CSS, but --color-accent still points to raw --accent (only Toggle with variant="ghost" uses --contrast-accent).
  • Borders barely strengthen or ignore the setting: --appearance-contrast-border-boost is only a quarter of the text boost ((contrast - 100) / 4, so 25% at maximum contrast). Glass dialog borders, glass dropdown borders, and the default composer outline use fixed low-opacity values and do not scale with the contrast setting at all.
  • Focus rings ignore the setting: --ring is not connected to the contrast tokens.

Computed from the default theme's colour values (not measured in the running app):

  • Selected sidebar row in light mode (white on near-white): about 1.04:1.
  • Menu highlight: about 1.1:1.
  • Command palette highlight: about 1.2:1.
  • Borders that do use --appearance-contrast-border-boost reach only about 2.1–2.6:1 at 200% contrast.

Where it comes from

  • apps/web/src/components/settings/AppearanceSettingsPanel.tsx:181 — setting description promises contrast adjustments for colors and borders.
  • apps/web/src/appearanceContrast.ts:5-9 — sets --appearance-contrast-boost up to 100%, but --appearance-contrast-border-boost to (contrast - 100) / 4 (25% max).
  • apps/web/src/index.css:273,1662-1666 — --color-accent uses raw var(--accent) instead of --contrast-accent; only apps/web/src/components/ui/toggle.tsx:28 uses --contrast-accent.
  • apps/web/src/components/ui/menu.tsx:149 — menu item highlight uses data-highlighted:bg-accent.
  • apps/web/src/index.css:299-301,1216-1218,1263-1265,1290-1292,1311-1313 — --sidebar-row-hover, --sidebar-row-active, and --sidebar-row-selected are not routed through the contrast mix.
  • apps/web/src/components/ui/command.tsx:247,250 — command palette highlight uses a hardcoded bg-foreground/[0.09] (and bg-accent! when active is set).
  • apps/web/src/index.css:464,468,497 — .dialog-glass and .dropdown-glass borders use fixed 8%–10% opacity mixes.
  • apps/web/src/components/chat/ComposerSurface.tsx:16-17 — default composer outline uses fixed rgb(0 0 0 / 8%) in light mode and 5% white in dark mode.
  • apps/web/src/index.css:268,1195 — --color-ring / --ring is not connected to the contrast tokens.

Suggested direction

  • Route --color-accent and the sidebar row state tokens through the existing contrast mix so default 100% appearance stays unchanged while higher contrast strengthens them.
  • Route glass borders, the composer outline, and --ring through the contrast mix as well.
  • Raise --appearance-contrast-border-boost (for example, dividing by 2 instead of 4, checking the result visually).
  • Give selected and highlighted rows a non-colour cue, such as a border or inset ring, that strengthens as contrast increases.

Related: #26402, #41864, #19208, #37944, #47511 (individual reports of nearly invisible selected states that stronger contrast would help), #42259.

Impact

Major degradation or frequent failure

Version or commit

0.1.13, main @ ca36afaeb1d

Environment

Web and desktop (shared apps/web UI). Found by reading the source at ca36afaeb1d. Contrast ratios above were computed from the default theme's colour values, not measured in the running app. Mobile was not checked (it does not use these components).

Logs or stack traces

No response

Screenshots, recordings, or supporting files

No response

Workaround

Switching themes can improve some individual states, but there is no way for users to make highlights, glass borders, or focus rings respond to the Contrast slider.

Drafted by Gemini 4 Neon and reviewed by Claude Opus 5.5 in T3 Code.

  1. akj(GitHub profile, opens in a new tab) added labelsbug

  2. akj(GitHub profile, opens in a new tab) added labelsneeds-triage

Sign in to join this conversation.