Skip to content

fix(a11y): bring light-mode text colours up to WCAG AA - #704

Open
Alicepoltora wants to merge 1 commit into
inkonchain:mainfrom
Alicepoltora:fix/light-text-contrast-aa
Open

Alicepoltora wants to merge 1 commit into
inkonchain:mainfrom
Alicepoltora:fix/light-text-contrast-aa

Conversation

@Alicepoltora

Copy link
Copy Markdown

Three measured contrast failures in light mode. All numbers from the WCAG 2.x relative-luminance formula on the token values in src/globals.css.

token / usage before after requirement
--secondary (every sidebar link, nav link, TOC link, search excerpt) on --background 3.95:1 #666666 → 5.74:1 4.5:1 (body text)
same on --container / --container-2 3.48 / 3.28 5.13:1 / 4.73:1 4.5:1
--positive ("Network added." in AddNetworkButton, CopyToast icon) on --background 2.46:1 #2e7d1f → 5.16:1 4.5:1 text, 3:1 non-text
::selection white text on --ink-light 3.38:1 white on --ink → 6.04:1 4.5:1

#666666 was chosen as the darkest-neutral step that still reads as the same grey while clearing 4.5:1 on all three light surfaces (a lighter #767676 clears white but drops to 4.06:1 on --container).

Dark-mode tokens already pass (--secondary 7.11:1, --ink-light 6.03:1) and are untouched, as are the brand ink colours themselves — only the neutral grey, the feedback green, and the selection background move.

Verified with a full pnpm build on the resulting tree: exit 0, and the emitted CSS contains --secondary:102 102 102 / --positive:46 125 31 with the .dark overrides unchanged. prettier --check clean.

--secondary (#808080) is the colour of every sidebar link, nav link, TOC
link and search excerpt in light mode, and on --background it measured
3.95:1 — below the 4.5:1 required for body text. #666666 measures 5.74:1
on --background, 5.13:1 on --container and 4.73:1 on --container-2.

--positive (#4bbc2d) is the 'Network added' success text in
AddNetworkButton and the CopyToast check icon; 2.46:1 on white fails both
the 4.5:1 text threshold and the 3:1 non-text one. #2e7d1f measures 5.16:1.

::selection used white text on --ink-light (3.38:1); --ink is 6.04:1.

Dark-mode tokens already pass (secondary 7.11:1, ink-light 6.03:1) and are
unchanged, as are the brand ink colours.
@Alicepoltora
Alicepoltora requested a review from a team as a code owner October 10, 2026 19:10
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.

1 participant