Repository navigation
fix(a11y): clear the known contrast entries in the stories sweep - #143
Merged
TheGreatAxios merged 1 commit intoOct 31, 2026
Merged
Conversation
The orange badge tones laid a translucent primary wash over whatever was below, so on a selected sidebar row the two washes stacked and the label fell to 4.38:1. They now sit on --primary-tint with --primary-tint-foreground, a static hex pair per mode that the contrast gate checks like every other fill (4.78:1 light, 4.92:1 dark). The measured fallback treated every textarea as painting, so the prompt input's transparent field hid the mirror that shows its words. A text field now paints only what its style draws: its box, its value or placeholder, and a selection. Where a field's glyphs paint nothing, the elements drawing its words that axe did not judge are sampled too. The known file maps each accepted violation to why it stands: the disabled prompt's half-opacity mirror (inactive controls are exempt from WCAG 1.4.3) and the avatar orbit, whose masked ring covers the initials in a way the sampler cannot see through.
Contributor
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. |
TheGreatAxios
approved these changes
Oct 30, 2026
TheGreatAxios
left a comment
Contributor
There was a problem hiding this comment.
Review · Approve
Replaces translucent orange badge washes with static --primary-tint / --primary-tint-foreground tokens, updates the contrast sampler so text fields only paint visible glyphs and queue unjudged underlying mirrors, and reduces e2e/stories-a11y.known.json to six documented entries.
Findings
e2e/contrast-dom.ts:127(informational) —fieldGlyphschecksresolve(getComputedStyle(field, "::placeholder").color)[3] > 0without checking-webkit-text-fill-color, whereassampleat line 447 checkslettering.getPropertyValue("-webkit-text-fill-color") || lettering.color.e2e/contrast-dom.ts:474(informational) —mirrored: drawers.size > 0is set unconditionally even whenclip !== undefinedprevented queueingdrawersat line 463.
Merged
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.
Summary
Clears the 18 contrast baselines that #120's measured check added to
e2e/stories-a11y.known.json. They came from 9 stories in light and dark, and had three causes.accent,warning,access) laidbg-primary/10over whatever was below. On a selected row, whose ground is already a 10% primary wash, the label fell to 4.38:1. The tones now use a new static pair,--primary-tint/--primary-tint-foreground, defined as hex in:root,.darkand the dark media block. The pair is mapped in@theme inlineand listed inREQUIRED, so the contrast gate checks it like every otherX/X-foregroundfill. It measures 4.78:1 in light and 4.92:1 in dark, the same look as before on a card.textareaas painting, so the prompt input's transparent field hid the mirror that shows its words. A text field (a textarea, or an input of type text, search, email, url or tel) now paints only what its style draws: its box, its value or placeholder, and a selection highlight. Where a field's glyphs paint nothing, the elements drawing its words that axe did not judge are sampled too, and their samples follow the targets'. The mirror text and tokens now measure and pass.chat-prompt-input--disabled, light and dark: the mirror of a disabled field is at half opacity (3.07 / 3.96:1). WCAG 1.4.3 exempts inactive controls.primitives-avatar--orbitand--stack-with-status, light and dark: the orbit ring is positioned over the initials and hollowed by a mask. Hit-testing finds its whole box, and the sampler takes a mask as opaque, so the ground under the initials can't be read.Notes for review
border-primary-emphasis/40. That border is decorative, not text.--primary-tintdoesn't change in the warm and cool themes, like--primary: those themes shift only surfaces.Verification
bun run check,bun run build,bun run contrast-testandbun run dep-guardpass.bun run test:e2epasses: 168 Playwright tests, including the Storybook axe sweep in light and dark.Closes #138