Repository navigation
fix(a11y): hold Atlas themes' text to 4.5:1 and run axe contrast in Storybook - #36
Merged
Merged
Conversation
Atlas dark muted-foreground #585858 -> #939393 (2.40 -> 5.55:1 on the popover, its worst surface) and text.disabled #3f3f3f -> #858585 (1.62 -> 4.62:1). The same floor in atlas light, atlas-mono, chyral and phosphor. text.disabled is pinned in those themes: the derived 0.2 mix cannot pass without lifting muted-foreground above secondary-foreground. terminal.ansi.bright_black keeps its old value where muted moved. Refs ATL-1006
…d links Refs ATL-1006
Refs ATL-1006
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.
ATL-1006. An axe run over every story (Atlas dark, colour contrast on) found no component-level violations, but
color-contrastfailed in 452 stories. Nearly all of it was Atlas dark'smuted-foreground(#585858, 2.4–2.95:1) andtext.disabled(#3f3f3f).Contrast
Atlas-authored themes now hold every text tier to at least 4.5:1 on background, card, sidebar, popover and muted. Ratios are against the worst of those surfaces, which is the popover:
text.disabledexplicitly. The derived value (muted 20% toward the background) can't reach 4.5:1 unlessmuted-foregroundgoes abovesecondary-foreground. The note inkeys.tomlexplains this.terminal.ansi.bright_blackis set to its old value wherevermuted-foregroundchanged, because a terminal's bright black is meant to look dim. One side effect: atlas-mono light'ssyntax.commentfollows its muted value and goes from #6b6b6b to #5d5d5d.keys.toml. Several of them still fail.Components
AccordionTriggerdropsoutline-noneand gets the global:focus-visiblering, the same oneButtonuses. The ring is drawn inset because the root'soverflow-hiddenwould clip it.AuthSplit: the form column is now a<main>element.DataTable: a clickable row is focusable and opens on Enter or Space, with an inset ring.TerminalOutputLine: a link segment isrole="link"and focusable, and opens on Enter. A pointer click still needs ⌘/Ctrl.role="button", and the outer click only makes the hit area bigger.Storybook
color-contrastnow runs underbun run test:storybook.MotionGlobalConfig.skipAnimations). Otherwise axe can measure an entrance fade partway through.contrastExempt(reason)fromstories/lib/a11y.ts. There are three reasons:disabled: the command compact disabled row andInputGroupDisabled.code-content: syntax and ANSI colours in the editor and terminal stories. Atlas dark's syntax colours are Pierre's palette.every-theme: the Tag story that draws all 15 themes.Gates
typecheck,test(652),test:storybook(853/853, contrast on),format:checkandtheme:checkall pass.