Skip to content

fix(Toast): the card's text takes its side's on-color, so the dark error toast reads at 4.5:1 - #13058

Merged
cixzhang merged 5 commits into
mainfrom
lane2/toast-text-on-color
Nov 20, 2026
Merged

cixzhang merged 5 commits into
mainfrom
lane2/toast-text-on-color

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

User impact

With Core's default colors (no theme), an error toast on a dark page draws its text at 3.61:1 on its red card, below the 4.5:1 WCAG 2.2 AA needs for normal text (SC 1.4.3). A reader with low vision can miss the error. After this change it reads at 4.70:1. The other three Core toast cards also take their on-color, and every first-party theme renders exactly as before.

Problem and solution fit

  • Why the text is low: in Core's defaults a media surface sets only its side's color scheme, so the card's text is the page scheme's --color-text-primary (#DFE2E5 in dark), not the side's on-color (--color-on-dark, #FFFFFF). Every first-party theme sets its media sides' text to its on-color, so only Core's defaults fall short.
  • Why it harms the task: an error toast is the only cue that an action failed, and it stays on screen until the reader dismisses it, so they have to read it.
  • Why the existing guard missed it: check-toast-text-contrast assumed the card draws its on-color and checked only the first-party themes; the Chromium spec skipped Core's defaults.

The card now restates --color-text-primary (and its text color) to the on-color of the side pickInvertedSide picks, inside its media surface, so a caller's <Text> follows it too. A card whose ambient text reads at least as well keeps it (side off). Before the measurement, a system-mode server render whose two sides differ (its reader's scheme is unknown) keeps the ambient text until the card is measured, as before. Its two sides come from the theme, or from Core's defaults when there is no theme (Core's info surface is dark in light mode and light in dark mode, so its server render keeps the ambient text; Core's error surface is dark in both, so it takes the on-color at once).

Expected behavior and authority

component:Toast FR14: once measured, the card's text takes the on-color side (--color-on-dark or --color-on-light) that reads best, and keeps the page's own text only when that reads at least as well as both; FR13 picks by the same rule. architecture:theme-tokens INV11 holds status text pairs to their contrast checks. No record changes.

Smallest restoration

One Toast change: an inner display: contents wrapper inside the card's MediaTheme restates --color-text-primary and color to the picked side's on-color token. No token value, theme, public prop or theming target changes. Rejected: deepening Core's dark --color-background-error-inverted, which would change the dark error toast in six themes that inherit it.

Evidence

Real Google Chrome 157 (headless, DPR 2), Storybook core-toast--types built at main and at this head; text color on the card's computed fill:

Theme Page Toast main This head
Core defaults dark error #DFE2E5 on #E3193B, 3.61:1 #FFFFFF, 4.70:1
Core defaults light error #DFE2E5 on #AA071E, 5.85:1 #FFFFFF, 7.61:1
Core defaults light info #DFE2E5 on #0A1317, 14.44:1 #FFFFFF, 18.78:1
Core defaults dark info #0A1317 on #FFFFFF, 18.78:1 #000000, 21:1
Neutral, Stone, Butter, Chocolate, Gothic, Matcha, Y2K light and dark info and error — unchanged (25 of 25 pairs, fill and text identical)
  • Reproduction before the change: the Core-defaults dark error row above.
  • Result after the change: 4.70:1 and up on every card.
  • Representative unchanged path: all first-party themes (table).
  • Regression tests, red first: Toast.mediaFallback.test.tsx "gives a dark error card the dark side's on-color text" fails on main and passes here; "keeps the ambient text on a server render whose two sides differ" pins the unknown-side case with Core's defaults. ToastTextContrast.a11y.chromium.spec.ts now covers Core's defaults (none) and the info toast beside the error toast; on main its Core dark error case reads 3.61:1. check-toast-text-contrast.test.mjs now resolves Core's defaults too (32 cases).

Before and after (real Chrome)

Theme Page main This head
Core defaults dark main head
Core defaults light main head
Neutral dark main head
Neutral light main head
Gothic dark main head
Gothic light main head
Chocolate dark main head
Chocolate light main head

Every theme's frames and the measured table: measures.tsv.

Scope

Components: Toast

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • vitest run --project ui packages/core/src/Toast: 170 tests pass (8 files).
  • vitest run --project node scripts/check-toast-text-contrast.test.mjs: 32 pass.
  • Core tsc, eslint, prettier and the comment-provenance baseline check are clean; pnpm review:pre lists no findings.
  • The Chromium spec runs in CI's browser lane (pnpm preflight --browser).

Overlap checked: #12708 (a do-not-merge release interaction check, not a Toast change)

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 20, 2026 6:49am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 20, 2026
@astracat-bot

astracat-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 20, 2026, 1:08 PM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 20, 2026
cixzhang added a commit that referenced this pull request Nov 20, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 56a2afd

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 8be306c

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Toast · Storybook 107.0 kB (+145 B) · 11.5 kB CSS (+48 B) 1,832 (+42) ✓ · ✓ · ✓

Package size: @astryxdesign/core 7.85 MB packed (+715 B); no new dependencies.

Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. The contrast fix works: with Core's default colors the dark error toast's text now reads at 4.70:1 (it was 3.61:1), the other three Core toast cards take their on-color, and every first-party theme renders identically. Two small fixes remain:

  • The Lint workflow's comment-provenance baseline check fails on this branch because the comment at Toast.tsx:130 cites (FR14); drop the citation instead of adding it to the baseline.
  • The comment at Toast.tsx:491-492 and the description say a system-mode server render whose two sides differ keeps the ambient text until it is measured, but with Core's defaults (no Theme) the card's two sides are never computed, so the server markup forces the light-page side's on-color; say the guard covers themed pages only, or extend it to Core's defaults.

Optional: the first sentence of the comment at Toast.tsx:130 restates the styles below it, so keeping only the reason (a caller's text follows the restated token) would read better.

Claims and files checked

Review mode: full; reason: no-earlier-review

Claims

  • With Core's defaults the dark error toast's text goes from 3.61:1 to 4.70:1: verified (Chromium probe of the rendered card on main and on this branch).
  • The other three Core cards take their on-color (7.61:1, 18.78:1, 21:1): verified (same probe).
  • Every first-party theme renders as before: verified (28 of 28 themed card frames are pixel-identical; the description's "25 of 25" undercounts the 28 pairs).
  • Core's media baseline sets only the color scheme, while themes restate text to the on-color: verified (reset.css, onMediaTokens.ts).
  • A card whose own text reads at least as well keeps it: verified (the side rule is unchanged; Neutral and Gothic error cards stay off).
  • A system-mode server render whose two sides differ keeps the ambient text until measured: false for Core's defaults (second finding above).
  • No token value, theme, public prop or theming target changes: verified (API surface comparison lists no rows; the diff adds none).
  • The new unit test fails on main and passes here: verified.
  • The Chromium spec now covers Core's defaults and the info toast: verified by reading; not run in this review.
  • The node contrast check resolves Core's defaults, 32 cases: verified (32 pass).
  • The Toast unit suite passes, 169 tests in 8 files: verified.
  • Core tsc, eslint and prettier are clean: tsc and prettier verified; eslint reports one warning at Toast.tsx:130 (first finding above).
  • The pre-review report lists no findings: verified.
  • Deepening Core's dark error surface would change six themes that inherit it: verified (only Gothic sets its own error surface).
  • The overlapping pull request is a release interaction check, not a Toast change: verified.
  • Changeset: dark-mode error toasts on Core's defaults go from 3.61:1 to 4.70:1, and themes that already draw their on-color look the same: verified.

Files

  • packages/core/src/Toast/Toast.tsx: both findings above, plus the optional comment suggestion.
  • packages/core/src/Toast/Toast.mediaFallback.test.tsx: clear (fails on main, passes here).
  • packages/core/src/Toast/__tests__/ToastTextContrast.a11y.chromium.spec.ts: clear.
  • scripts/check-toast-text-contrast.test.mjs: clear.
  • .changeset/toast-text-on-color.md: clear.

Automated review (maintainer link)

Comment thread packages/core/src/Toast/Toast.tsx Resolved
Comment thread packages/core/src/Toast/Toast.tsx Resolved
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 0411c1b

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet because the pull request is a draft, and marking it ready for review starts it.

With Core's default colors the dark error toast's text now reads at 4.70:1 (it was 3.61:1), the other three Core toast cards take their on-color, and the first-party themes render identically. Both earlier points are fixed: the comment no longer cites a record, and a system-mode server render whose two sides differ now keeps the base's text with Core's defaults too.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.
  • Claim: with Core's default colors the dark error toast's text goes from 3.61:1 to 4.70:1. Verified: Chromium probe of the error story on the base and this head.
  • Claim: the other three Core toast cards take their on-color. Verified: same probe (light error 7.61:1, light info 18.78:1, dark info 21:1).
  • Claim: every first-party theme renders as before. Verified: Neutral, Chocolate, Gothic and Stone cards are pixel-identical on base and head, and the description's 25-pair table is unchanged.
  • Claim: Core's media surface sets only its color scheme, while compiled themes restate text to the on-color. Verified: MediaTheme.tsx styles, onMediaTokens.ts:59 and :73.
  • Claim: the contrast guards missed Core's defaults. Verified: the base versions of both guard files.
  • Claim: the card restates the text token and color to the picked side's on-color, so a caller's text follows. Verified: Toast.tsx:130-142, :538-543, Text/text.stylex.ts:28.
  • Claim: a card whose own text reads at least as well keeps it. Verified: mediaSide.ts:77-81, Toast.tsx:516.
  • Claim: a system-mode server render whose two sides differ keeps the ambient text, Core's info card included, while Core's error card takes the on-color at once. Verified: Toast.tsx:494-516 and the two new server-render tests.
  • Claim: the Toast spec's text-side clauses govern and no record changes. Verified; the cited token-contrast clause covers status roles, so it is context only.
  • Claim: no token value, theme, public prop or theming target changes. Verified: API surface comparison lists 0 rows.
  • Claim: deepening Core's dark error surface would change six themes that inherit it. Verified: only gothicTheme.ts:269 sets that surface.
  • Claim: the new unit test fails on main and passes here. Verified: run on the base with this head's test.
  • Claim: the Chromium spec now covers Core's defaults and the info toast. Verified by reading; it runs in CI's browser lane, which has not run on this draft.
  • Claim: the node guard resolves Core's defaults in 32 cases. Verified: 32 pass.
  • Claim: 170 Toast tests in 8 files pass, and tsc, eslint, prettier, the comment-provenance baseline and the pre-review report are clean. Verified at this head.
  • Claim: the overlapping pull request is a release interaction check, not a Toast change. Verified.
  • Changeset: dark-mode error toasts are easier to read, 3.61:1 to 4.70:1, with themes unchanged. Verified.
  • File .changeset/toast-text-on-color.md: clear.
  • File packages/core/src/Toast/Toast.tsx: clear (one optional comment suggestion inline).
  • File packages/core/src/Toast/Toast.mediaFallback.test.tsx: clear.
  • File packages/core/src/Toast/__tests__/ToastTextContrast.a11y.chromium.spec.ts: clear.
  • File scripts/check-toast-text-contrast.test.mjs: clear.

Automated review (maintainer link)

Comment thread packages/core/src/Toast/Toast.tsx Resolved
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 8be306c

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet because the pull request is a draft, and marking it ready for review starts it.

With Core's default colors every toast card's text now takes its side's on-color, so the dark error toast reads at 4.70:1 (it was 3.61:1), and the first-party themes render identically. The comment rewrite since the last review is clear, and nothing is left to change.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.
  • Claim: with Core's default colors the dark error toast's text goes from 3.61:1 to 4.70:1. Verified: Chromium probe of the error story on the base and this head.
  • Claim: the other three Core toast cards take their on-color. Verified: same probe (light error 5.85:1 to 7.61:1, light info 14.44:1 to 18.78:1, dark info 18.78:1 to 21:1).
  • Claim: every first-party theme renders exactly as before. Verified: Neutral, Gothic and Chocolate error cards and Stone and Y2K info cards are pixel-identical on the base and this head; first-party themes already restate media-side text to the on-color.
  • Claim: Core's media surface sets only its side's color scheme, so the card drew the scheme's text token rather than the on-color. Verified: the media baseline in reset.css, MediaTheme.tsx and onMediaTokens.ts.
  • Claim: the existing guards missed Core's defaults. Verified: the base versions of both guard files.
  • Claim: the card restates the text token and color to the picked side's on-color, so a caller's text follows. Verified: Toast.tsx:130-142 and :538-543, and Text reads the same token.
  • Claim: a card whose own text reads at least as well keeps it. Verified: mediaSide.ts and Toast.tsx:516.
  • Claim: a system-mode server render whose two sides differ keeps the ambient text, Core's info card included, while Core's error card takes the on-color at once. Verified: Toast.tsx:494-516 and the two new server-render tests.
  • Claim: the Toast spec's text-side clauses govern and no record changes. Verified; the cited token-contrast clause covers status roles, so it is context only.
  • Claim: no token value, theme, public prop or theming target changes. Verified: the built API surface of Core and the seven themes lists 0 changes.
  • Claim: deepening Core's dark error surface would change six themes that inherit it. Verified: only Gothic sets that surface.
  • Claim: the new unit test fails on main and passes here. Verified: run on the base with this head's test.
  • Claim: the Chromium spec now covers Core's defaults and the info toast. Verified: 32 of 32 pass at this head.
  • Claim: the node guard resolves Core's defaults in 32 cases. Verified: 32 pass.
  • Claim: 170 Toast tests in 8 files pass, and typecheck, lint, formatting, the comment-provenance baseline and the pre-review report are clean. Verified at this head.
  • Claim: the overlapping pull request is a release interaction check, not a Toast change. Verified.
  • Changeset: dark-mode error toasts are easier to read, 3.61:1 to 4.70:1, and themes that draw their on-color look the same. Verified.
  • Title: the card's text takes its side's on-color and the dark error toast reaches 4.5:1. Verified (4.70:1).
  • File .changeset/toast-text-on-color.md: clear.
  • File packages/core/src/Toast/Toast.tsx: clear.
  • File packages/core/src/Toast/Toast.mediaFallback.test.tsx: clear.
  • File packages/core/src/Toast/__tests__/ToastTextContrast.a11y.chromium.spec.ts: clear.
  • File scripts/check-toast-text-contrast.test.mjs: clear.

Automated review (maintainer link)

@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 20, 2026
@cixzhang
cixzhang marked this pull request as ready for review November 20, 2026 12:19

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested for one description edit; the code itself needs no change. With Core's default colors every toast card's text now takes its side's on-color, so the dark error toast reads at 4.70:1 (it was 3.61:1), themed cards are unchanged, and every CI check at this head is green.

  • Miss: the description's "Why it harms the task" says an error toast "leaves on its own", but an error toast stays until it is dismissed by default (ToastViewport.tsx:326, component:Toast FR2), so please reword that sentence, for example "it stays on screen until the reader dismisses it".

Editing the description needs no new commit.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0): none.
  • Claim: Title: the card's text takes its side's on-color and the dark error toast reaches 4.5:1. Verified: 4.70:1 (CI's Chromium contrast spec and the token values).
  • Claim: Release note: with Core's default colors a toast's text uses its card's on-color, the dark error toast goes from 3.61:1 to 4.70:1, and themes that already draw their on-color look the same. Verified: Toast.tsx:135-142 and :538-543, the before and after frames, and onMediaTokens.ts:55-63.
  • Claim: With Core's default colors the dark-page error toast's text reads 3.61:1, under 4.5:1, and 4.70:1 after the change. Verified: frames and token values.
  • Claim: The other three Core toast cards also take their on-color. Verified: light error 5.85:1 to 7.61:1, light info 14.44:1 to 18.78:1, dark info 18.78:1 to 21:1.
  • Claim: Every first-party theme renders exactly as before. Verified: every theme already restates media-side text to the on-color (Gothic overrides only accent roles), and the Neutral dark error card is pixel-identical.
  • Claim: Why the text is low: a Core media surface sets only its side's color scheme, so the card drew the scheme's text token, not the on-color. Verified for the dark page (reset.css:403-409, tokens.stylex.ts:40,48); on a light page the card draws the side scheme's value, as the description's own table shows.
  • Claim: Every first-party theme sets its media-side text to its on-color, so only Core's defaults fall short. Verified: onMediaTokens.ts:55-63, gothicTheme.ts:528-539.
  • Claim: Why it harms the task: an error toast leaves on its own. False: an error toast does not auto-hide by default (ToastViewport.tsx:326, the Toast spec's auto-hide clause).
  • Claim: The existing guards missed it: the node guard checked only the themes and assumed the on-color, and the Chromium spec skipped Core's defaults. Verified: the base versions of both files.
  • Claim: The card restates the text token and its color to the picked side's on-color, so a caller's <Text> follows. Verified: Toast.tsx:135-142, :538-543, Text/text.stylex.ts:28.
  • Claim: A card whose own text reads at least as well keeps it. Verified: pickInvertedSide in mediaSide.ts and Toast.tsx:516.
  • Claim: A system-mode server render whose two sides differ keeps the ambient text until the card is measured; Core's info card keeps it and Core's error card takes the on-color at once. Verified: Toast.tsx:494-516 and the two new server-render tests.
  • Claim: The Toast spec's text-side clauses govern and no record changes; the token record holds status text pairs to contrast checks. Verified; the token clause covers status roles, so it is context only.
  • Claim: No token value, theme, public prop or theming target changes. Verified: the source diff and CI's API change list for this head (0 rows).
  • Claim: Deepening Core's dark error surface would change six themes that inherit it. Verified: only Gothic sets that surface.
  • Claim: The measured before and after table for Core's four cards, with the themes unchanged. Verified: the numbers reproduce at this head.
  • Claim: Result after the change: 4.70:1 and up on every card. Verified for the four Core cards the change affects.
  • Claim: The new server-render test fails on main and passes here, and the second pins the unknown-side case. Verified: run on the base with this head's test, and at this head.
  • Claim: The Chromium spec now covers Core's defaults and the info toast, and on main the Core dark error case reads 3.61:1. Verified: 32 of 32 pass in CI at this head; base frame receipt.
  • Claim: The node guard resolves Core's defaults in 32 cases. Verified: 32 pass.
  • Claim: 170 Toast tests in 8 files pass. Verified at this head.
  • Claim: Typecheck, lint, formatting and the comment-provenance baseline are clean, and the pre-review report lists no findings. Verified: CI's typecheck and Lint workflow pass at this head; the pre-review report from CodeBunny's earlier run at this head.
  • Claim: The Chromium spec runs in CI's browser lane. Verified: it ran there at this head.
  • Claim: Scope: one defect restored, no tagalongs, no new public API, no internal context in public text. Verified.
  • Claim: The overlapping pull request is a do-not-merge release interaction check, not a Toast change. Verified.
  • File .changeset/toast-text-on-color.md: clear.
  • File packages/core/src/Toast/Toast.tsx: clear.
  • File packages/core/src/Toast/Toast.mediaFallback.test.tsx: clear.
  • File packages/core/src/Toast/__tests__/ToastTextContrast.a11y.chromium.spec.ts: clear.
  • File scripts/check-toast-text-contrast.test.mjs: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. With Core's default colors every toast card's text now takes its side's on-color, so the dark error toast reads at 4.70:1 (it was 3.61:1), themed cards render exactly as before, and CI at this head has finished with no failures. The description sentence the last review flagged now matches the error toast's default persistence, so nothing is left to change.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0): none.
  • Claim: Title: the card's text takes its side's on-color and the dark error toast reaches 4.5:1. Verified: 4.70:1 in Chromium at this head and in the contrast spec in CI.
  • Claim: Release note: with Core's default colors a toast's text uses its card's on-color, the dark error toast goes from 3.61:1 to 4.70:1, and themes that already draw their on-color look the same. Verified: Toast.tsx:135-142 and :538-543, before and after Chromium measurements, and unchanged Neutral and Gothic frames.
  • Claim: With Core's default colors the dark-page error toast's text reads 3.61:1 before and 4.70:1 after. Verified: Chromium measurements on base and head.
  • Claim: The other three Core toast cards also take their on-color. Verified: light error 5.85:1 to 7.61:1, light info 14.44:1 to 18.78:1, dark info 18.78:1 to 21:1.
  • Claim: Every first-party theme renders exactly as before. Verified: each theme already restates media-side text to the on-color (onMediaTokens.ts:55-63; Gothic overrides only accent roles, gothicTheme.ts:528-539), and the Neutral and Gothic dark error cards are pixel-identical.
  • Claim: Why the text is low: a Core media surface sets only its side's color scheme, so the card drew the scheme's text token rather than the on-color. Verified for the dark page it describes (reset.css:398-409, MediaTheme.tsx:51-53, tokens.stylex.ts:40,48).
  • Claim: Every first-party theme sets its media-side text to its on-color, so only Core's defaults fall short. Verified: onMediaTokens.ts:55-63.
  • Claim: Why it harms the task: an error toast is the only cue that an action failed and stays on screen until dismissed. Verified: ToastViewport.tsx:326 and the Toast spec's auto-hide clause.
  • Claim: The existing guards missed it: the node guard checked only the themes and assumed the on-color, and the Chromium spec skipped Core's defaults. Verified: the base versions of both files.
  • Claim: The card restates the text token and its color to the picked side's on-color, so a caller's <Text> follows. Verified: Toast.tsx:135-142, :538-543, Text/text.stylex.ts:27-29.
  • Claim: A card whose own text reads at least as well keeps it. Verified: pickInvertedSide in hooks/mediaSide.ts and Toast.tsx:516.
  • Claim: A system-mode server render whose two sides differ keeps the ambient text until the card is measured; Core's info card keeps it and Core's error card takes the on-color at once. Verified: Toast.tsx:491-516, tokens.stylex.ts:60-61, and the two new server-render tests.
  • Claim: The Toast spec's text-side clauses govern and no record changes; the token record holds status text pairs to contrast checks. Verified; the token clause covers status roles, so it is context only.
  • Claim: One Toast change; no token value, theme, public prop or theming target changes. Verified: the source diff and CI's API change list for this head (no rows).
  • Claim: Deepening Core's dark error surface would change six themes that inherit it. Verified: only Gothic sets that surface.
  • Claim: The measured before and after table for Core's four cards. Verified: every number reproduces in Chromium at this head.
  • Claim: The themes are unchanged across their info and error cards. Verified by mechanism and by the Neutral and Gothic frames; the stated pair count is the author's own tally.
  • Claim: Result after the change: 4.70:1 and up on every card. Verified: the four Core cards, and every themed card at 4.5:1 or more in CI.
  • Claim: The new dark error server-render test fails on main and passes here, and the second pins the unknown-side case. Verified: run on the base with this head's test (1 failed, 8 passed), and at this head.
  • Claim: The Chromium spec now covers Core's defaults and the info toast, and on main the Core dark error case reads 3.61:1. Verified: 32 of 32 pass in CI at this head; 3.61:1 measured on the base.
  • Claim: The node guard resolves Core's defaults in 32 cases. Verified: 32 pass in CI's node tests.
  • Claim: 170 Toast tests in 8 files pass. Verified at this head.
  • Claim: Typecheck, lint, formatting and the comment-provenance baseline are clean, and the pre-review report lists no findings. Verified: CI's typecheck and Lint workflow pass at this head; the pre-review report lists 0 findings.
  • Claim: The Chromium spec runs in CI's browser lane. Verified: it ran there at this head.
  • Claim: Scope: one defect restored, no tagalongs, no new public API, no internal context in public text. Verified.
  • Claim: The overlapping pull request is a do-not-merge release interaction check, not a Toast change. Verified.
  • File .changeset/toast-text-on-color.md: clear.
  • File packages/core/src/Toast/Toast.tsx: clear.
  • File packages/core/src/Toast/Toast.mediaFallback.test.tsx: clear.
  • File packages/core/src/Toast/__tests__/ToastTextContrast.a11y.chromium.spec.ts: clear.
  • File scripts/check-toast-text-contrast.test.mjs: clear.

Automated review (maintainer link)

@cixzhang cixzhang removed the needs:design-review Affects visuals — Design should review label Nov 20, 2026
@cixzhang
cixzhang merged commit e833d92 into main Nov 20, 2026
165 checks passed
@github-actions
github-actions Bot deleted the lane2/toast-text-on-color branch November 21, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 8be306c4 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant