Docs / CONTRAST-AUDIT
Contrast audit: desktop app and player shell (v0.2.0)
Source: docs/CONTRAST-AUDIT.md
Status: 0 color-contrast violations and 0 failing computed pairs in every
theme (light, dark, system-light, system-dark) and every accent (lime, mint,
blue, amber). This was measured in the real Electron app on 2026-11-29.
This finishes item 195. Item 195 merged the audit tooling and the CSS fixes
but did not include this document or the after-screenshots.
How it was measured
npm --prefix desktop ci # axe-core 4.10.3 (devDependency)
cd desktop
GC_QA_SIMULATED_STATUS=1 npx electron scripts/contrast-audit/run.cjs <out.json> <shotDir>
node scripts/contrast-audit/summarize.cjs <out.json> [--details]
run.cjsboots the guarded QA app (scripts/qa-launch.cjsblocks
up/stop/down) with a throwaway userData folder
($TMPDIR/gc-contrast-qa-*). It never uses the owner's running app.- It walks 32 views (Studio and its tour, Worlds with its menu, selection and
confirm, Discover with empty and detail states, the three Library tabs and
their Add dialogs, all three Create stages, every Settings group, and the
saved notice). It does this for 4 themes × 4 accents, giving 16 combinations
and 512 view renders. - For each view it records:
- axe-core
color-contrast/link-in-text-block - computed-style pairs that axe skips:
::selection,::placeholder, text
drawn by::before/::after, form-control boundaries (1.4.11), status
dots, and every text node - hover, focus-visible and active states, forced through
CSS.forcePseudoStateand re-measured with axe, text checks and focus-ring checks
- axe-core
- New in this pass:
- Accent loop.
CONTRAST_ACCENTS, with report keys
<theme>/<accent>. summarize.cjs, which produces the tables below.- Owner-sandbox guard. Kiri lists every instance on the machine. The
first run opened the owner'sgc174-acceptancemanifest in the editor
view (read-only: nothing was written, and the file timestamps are
unchanged).manifest-editornow runs only on a project inside the run's
throwaway folders. The same split editor is measured increate-configure. - Single retry for forced states. One run showed 32 "no outline"
focus results indark/blue › worlds-selected. The simulated-status
refresh had re-rendered the rows after their state was forced. Two
targeted re-runs of that view gave 0.run.cjsnow re-forces and
re-measures once before it records a failure. A real failure survives the
retry.
- Accent loop.
Before and after
Before item 195 (commit 0119e9e^, accent lime: accents did not exist yet)
| theme / accent | axe violations | failing computed pairs | failing forced-state checks | total |
|---|---|---|---|---|
| light/lime | 8 | 99 | 3 | 110 |
| dark/lime | 8 | 121 | 48 | 177 |
| system-light/lime | 8 | 97 | 4 | 109 |
| system-dark/lime | 8 | 121 | 48 | 177 |
That is 573 failures (162 distinct). By kind: 334 control boundaries, 96 text,
8 placeholder, 32 axe, and 103 forced-state checks. The full list is in
desktop/docs/screenshots/contrast/before/FAILURES.md. The screenshots from
that time are in desktop/docs/screenshots/contrast/before/.
Start of this pass (2770a9f: items 195 + 197 merged)
All 16 theme/accent combinations: 0 axe violations, 0 failing computed
pairs, 0 failing forced-state checks. Items 195 and 197 had already fixed
the CSS; what was missing was the evidence.
After (this branch)
| theme / accent | axe violations | failing computed pairs | failing forced-state checks | total |
|---|---|---|---|---|
| light/lime · mint · blue · amber | 0 | 0 | 0 | 0 |
| dark/lime · mint · blue · amber | 0 | 0 | 0 | 0 |
| system-light/lime · mint · blue · amber | 0 | 0 | 0 | 0 |
| system-dark/lime · mint · blue · amber | 0 | 0 | 0 | 0 |
The run with screenshots showed one artifact (the dark/blue retry case
above). The re-runs, and every later run with the retry, gave 0.
Pairs measured in the after run, all 16 combinations together, all passing:
| check | measured | failing |
|---|---|---|
| text nodes (computed) | 52,801 | 0 |
::selection |
17,521 | 0 |
| status dots (3:1) | 5,296 | 0 |
| form-control boundaries (3:1) | 1,298 | 0 |
::before/::after text |
129 | 0 |
::placeholder |
66 | 0 |
The task's named checks are all included: the selection, placeholder, control
boundary, focus ring, status dot and Settings sub-nav active-state pairs, the
chips and text on lime. The accent token pairs (--on-lime on --lime and
--lime-hover, --lime-ink and --focus on every surface) are also locked
for every theme × OS × accent by desktop/test/contrast-tokens.test.cjs.
Justified exceptions (axe "incomplete": reviewed by hand)
axe returned 51 "incomplete" results per combination. None of them is a
failure:
| incomplete | why axe could not decide | measured |
|---|---|---|
#rail-work-label |
the rail holds the pixel-cat <img> |
text on the solid rail colour passes in the computed check |
.kind-tag, .template-kind on covers |
text sits over a cover image | own background rgba(255,255,255,.94). Worst case over a black image: #1a1b16 on #f0f0f0 = 15.20:1 |
.template-number |
over a cover image | own background rgba(26,27,22,.78). Worst case over a white image: #f6f1e7 on #4d4e4a = 7.45:1 |
.terminal, textarea |
partly covered by a scroll container | --terminal-ink on --terminal-bg is locked by the token test |
.settings-choice-check (✓) |
content has only non-text characters | --lime-ink on the card, ≥ 4.5:1 per the token test |
button[aria-label="Open worlds for test"] > span |
overlapped by the count badge | computed text check passes |
Disabled controls are exempt under WCAG 1.4.3 and 1.4.11. Even so, none of
them failed: since item 195, disabled buttons use muted text at full opacity.
Root causes (fixed in items 195/197; verified here)
- Form-control boundaries used the hairline token.
--linewas
#e1dfd1on white (1.34:1) and#343a46on#1e222b(1.39:1). There is
now a--control-linetoken (#7a808alight,#80879adark) for inputs,
selects, textareas,textarea.terminaland the switch. Most of the
pre-195 failures were boundaries (334 of 573). - Faded text.
.meta-key { opacity: .8 }and
.summary-item[data-zero] { opacity: .55 }pushed--mutedbelow the line:
3.44:1 on the selected row in light, and 4.48:1 in dark. The opacity was
removed, and the zero-count chips now use a dashed boundary instead. - Disabled buttons used
opacity: .5. They now use--raisedfill,
--mutedtext and full opacity. - The tour focus ring used
--lime-line(1.62:1 on light ground). It now
uses--focus. - Placeholder used the browser's default grey (
#757575on#1e222b,
3.46:1). It now uses::placeholder { color: var(--muted); opacity: 1 }. - The "pressed" orange icon was
#c2410con#ededee(4.44:1) in dark
hover and active states. It is now#9a3412. - Accents (item 197). Each accent sets its own
--lime-ink,--on-lime
and--focusper theme, so text on the accent fill and accent text on
surfaces stay at or above AA for mint, blue and amber too.
Player shell overlay (v0.2.0 pre-release)
The game player overlay (templates/_shared/player-shell/shell.css) is not part
of the desktop app, so it has its own audit:
npx electron scripts/contrast-audit/player-shell.cjs. It measures 12
controls × 6 states (normal, hover, focus-visible, active, pressed, disabled)
over dark, bright, grey and lime game frames. 152 of 288 measurements failed
before the fix; 0 of 288 fail after.
The cause was that Pause on hover and active drew lime text on the lime fill
(1.11:1), because of a lost cascade. The details, a real Tortimer session and
the screenshots are in
desktop/docs/screenshots/player-shell-contrast/README.md.
Screenshots
desktop/docs/screenshots/contrast/before/: before item 195, light and dark.desktop/docs/screenshots/contrast/after/: this pass. See its README.

