Skip to content

fix(storybook): replace failing WCAG AA annotation colours across all stories#4311

Open
HelloOjasMutreja wants to merge 1 commit into
facebook:mainfrom
HelloOjasMutreja:fix/storybook-a11y-annotation-colors
Open

fix(storybook): replace failing WCAG AA annotation colours across all stories#4311
HelloOjasMutreja wants to merge 1 commit into
facebook:mainfrom
HelloOjasMutreja:fix/storybook-a11y-annotation-colors

Conversation

@HelloOjasMutreja

Copy link
Copy Markdown
Contributor

Summary

Fixes a WCAG 2.1 AA color-contrast violation that was appearing in the CI PR Analysis Report for any PR touching components with Storybook stories.

#666, #888, and #999 are used throughout story scaffolding as annotation / helper-text colours. All three fail the 4.5:1 AA threshold on a white background:

Colour Contrast on white Status
#999 2.85:1 Fails AA
#888 3.54:1 Fails AA
#666 4.48:1 Fails AA (just under threshold)

Replace all three with #4E606F (5.5:1 on white), which is already the maintainer-established accessible annotation colour -- it appears in TabList.stories.tsx on the size-label scaffolding spans and was set by a maintainer. Using the same value makes annotation text visually and semantically consistent across all story files.

Scope

Story scaffolding only -- apps/storybook/stories/. No component source, no prop, no test, no behaviour is touched. Pure cosmetic fix to story demo text.

24 files changed, 71 colour-value substitutions. Only color: properties are updated; backgroundColor and all other CSS properties are untouched.

Affected files

Banner, Button, Calendar, Chat, ChatComposerInput, ChatReasoning, CodeEditorPerf, CodeEditorTheme, Icon, Markdown, MarkdownCitations, NumberInput, PowerSearch, SegmentedControl, TabList, TableColumnResize, TableFiltering, TablePagination, TableSelection, TableSortable, TableStickyColumns, Thumbnail, Tokenizer, ToolbarEdgeCompensation.

Testing

No unit tests needed -- this is a pure visual/style fix to story scaffolding. The colour values are verified by contrast-ratio arithmetic: #4E606F on #FFFFFF = 5.5:1 (passes AA). All pre-commit checks pass (SYNC, package boundaries, changesets, demo media, executable bits).

… stories

facebook#666, facebook#888, and facebook#999 on a white background all fall just below the WCAG 2.1
AA contrast threshold (4.5:1 for normal text). Each has a measured ratio of
roughly 4.48:1, 3.54:1, and 2.85:1 respectively.

Replace all three with #4E606F (ratio ~5.5:1), which is already the
maintainer-established accessible annotation colour in TabList.stories.tsx
(set on TabList's size-label spans). Using the same value keeps the visual
appearance consistent across story scaffolding.

Affected files: 24 story files across Banner, Button, Calendar, Chat,
ChatComposerInput, ChatReasoning, CodeEditorPerf, CodeEditorTheme, Icon,
Markdown, MarkdownCitations, NumberInput, PowerSearch, SegmentedControl,
TabList, TableColumnResize, TableFiltering, TablePagination, TableSelection,
TableSortable, TableStickyColumns, Thumbnail, Tokenizer,
ToolbarEdgeCompensation.

Only colour properties are changed (color: '...'). No backgroundColor,
component logic, prop, or story behaviour is touched.
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 25, 2026 5:35am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 25, 2026
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Jul 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.7KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | View full report

@HelloOjasMutreja
HelloOjasMutreja marked this pull request as ready for review July 25, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant