Repository navigation
fix(a11y): the ghost button's ink was chosen for a white page that does not exist - #4
Open
drsamonline wants to merge 1 commit into
Open
drsamonline wants to merge 1 commit into
drsamonline wants to merge 1 commit into
Conversation
…es not exist
The fleet contrast gate failed on 2026-11-23 with
app-jacquard ('A', 'Read the referen', 1.63, (14, 12, 8)) - one text run at
1.63:1.
Cause: a later override set .btn.ghost{color:#3f3529!important} on the theory
that 'the page behind it is white in both themes'. It is not. body paints
#0e0c08 in both themes - the light-theme block overrides --paper and --line,
not the body background - so a dark ink landed on a dark page. docs/play/
carried the same override for .support-open.
Fix: remove both overrides and let each control keep its own light ink
(#e9e2d4 on #0e0c08 = 15.9:1). The code chip's dark ink stays: it is a light
chip on the same dark page, and it is readable.
Guard: test-node.js now computes WCAG contrast from the CSS itself - the ink the
browser will use against the last colour body actually paints - for both pages
and both controls. Verified by mutation: putting either override back fails the
suite with the same 1.63:1 the gate reported.
node test-node.js: 115 passed, 0 failed.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The failure
audit→ contrast failed on 2026-11-23 (run 45214674681) with exactly one unreadable text run:1.63:1 — the sampled background is
(14,12,8)=#0e0c08, i.e. the page's own dark body.The cause
A later override in
docs/index.htmlsaid:The page is not white in either theme.
bodypaints#0e0c08; the light-theme block overrides--paperand--line, not the body background. So the override put a dark ink on a dark page.docs/play/index.htmlcarries the same override for.support-open.The fix
Remove both overrides. Each control keeps its own ink from its base rule —
#e9e2d4on#0e0c08is 15.9:1. Thecodechip rule stays: it is a light chip on the same dark page, so its dark ink is correct.The guard
test-node.jsnow derives the ratio from the CSS itself — the ink the browser will actually use (lastcolorfor the control) against the last colourbodyactually paints — for both pages and both controls.Verified by mutation:
.btn.ghost{color:#3f3529!important}put back on the landing pagedocs/index.html: .btn.ghost ink #3f3529 reads on #0e0c08 (1.63:1, needs 4.5:1).support-open{color:#3f3529!important}put back on the play pagedocs/play/index.html: .support-open ink #3f3529 reads on #0e0c08 (1.63:1, needs 4.5:1)The number it reports is the number the fleet gate reported.
Proof
node test-node.js— 115 passed, 0 failed (was 112 + the new checks).Once merged, the next
audit→ contrast run should be clean for this repository.