Skip to content

fix(themes): butter, neutral, matcha and y2k text reads at 4.5:1 on pressed fills and the accent tint - #12276

Closed
josephfarina wants to merge 8 commits into
mainfrom
josephfarina/themes-input-border-contrast
Closed

josephfarina wants to merge 8 commits into
mainfrom
josephfarina/themes-input-border-contrast

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

User impact

In four official themes, some text did not reach WCAG AA (4.5:1) on a pressed fill or on the accent tint (measured on the rendered page):

  • butter, light mode: accent text, the secondary and ghost buttons' text and nav item text read 3.83:1 (a pressed secondary button) to 4.27:1 (a pressed nav item) on a pressed fill, and 3.75:1 on the accent tint of a selected row, a numbered citation or a dropzone.
  • neutral, dark mode: a nav item's text read 4.12:1 when pressed on the top bar.
  • y2k and matcha, light mode: a nav item's text read 4.27:1 and 4.31:1 when pressed on AppShell's default top bar, which paints the page.

With this change, that text reads at 4.5:1 or more on those fills.

Problem and solution fit

  • Why does it occur? These text colours were picked against the page alone. The pressed fill and the accent tint sit on the page and darken or tint it, so the same text loses contrast there.
  • Why does it harm the task? A current page number, a pressed nav item and a button's label are what people read to know where they are and what they pressed.
  • Why does that matter? These are the themes people start from.

Each colour moves one step on the theme's own ramp, only in the mode that failed.

Expected behavior and authority

WCAG 2.2 AA, success criterion 1.4.3 (Contrast, Minimum): body text needs 4.5:1 against its background.

Smallest restoration

Theme Change (light mode)
butter --color-text-accent, the secondary and ghost Button text and nav item text: accent.light[40] → accent.light[35]
neutral nav item secondary text in dark mode: neutral.dark[65] → neutral.dark[70]
matcha nav item secondary text in light mode: neutral.light[30] → neutral.light[25]
y2k nav item secondary text in light mode: the stop its selected rows already use

No fills or borders change. The bundled CLI copies are regenerated.

Evidence

  • Reproduction before the change: scripts/check-text-contrast-by-role.test.mjs with the new rows fails on main for each pair above.
  • Result after the change: the guard passes for all seven themes in both modes, and the theme package tests pass.
  • Representative unchanged path: dark mode and every other text role.
  • Regression test: the guard now measures every changed text on each surface it sits on: links on the accent tint as well as primary and secondary text; a nav item's text at rest, hovered, pressed and selected, in the colour it draws, on the page and on a surface (the top bar paints one or the other); and a ghost or secondary button's label at rest, hovered and pressed, on the page and on a surface.

Scope

Components: theme-butter, theme-neutral, theme-matcha, theme-y2k, cli (bundled theme copies)

  • 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

  • CI=1 pnpm vitest run --project node scripts/check-text-contrast-by-role.test.mjs scripts/check-secondary-text-contrast.test.mjs packages/themes
  • The cli typechecks: typecheck:template-docs, typecheck:strict, typecheck:json-api, typecheck:authoring, and tsc --project tsconfig.api-dts.json
  • node scripts/generate-cli-themes.mjs with the output committed; node scripts/check-changesets.mjs

look gate: PASS (butter, light and dark, desktop and phone); neutral, matcha and y2k: no new findings vs main

Theme editor: in a theme made like Neutral, the editor now lifts top nav item secondary text against the pressed fill it sits on (the pressed fill replaces the hover fill, so no hover is measured). A new accent keeps that lift; a new neutral moves it with the other lifts.

Records

theme:butter, theme:neutral and theme:y2k state the new stops and the ratios the contrast guard measures for them, under spec:AST-020 FR1 (4.5:1 for normal text), and list the guard in verified_by. Core's changeset names themePalette(); the theme editor's change has its own [experimental] changeset.

Writing rubric results

Records checked: theme:butter, theme:neutral, theme:y2k (each pass over all three).

R1 narration: none; each added sentence states what the theme draws now, in the present tense.
R2 research: none in the records; the ratios are the guard's measurements.
R3 evidence: each claim cites its ratio and the guard file, not a change.
R4 rejected alternatives: none added.
R5 change references: none.
R6 open questions: none added.
R7 project status: none.

Owner review

Needs a design-owner review from @rubyycheung: the theme:butter, theme:neutral and theme:y2k record wording, and the themePalette() top nav item lift under spec:AST-008 FR19 (she is an owner of both).

@vercel

vercel Bot commented Nov 17, 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 21, 2026 1:32am UTC

Request Review

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

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 1:53 AM UTC

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 57aa908

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@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 are needed before approval, and one text-colour choice needs an owner decision: the contrast problem is real (the new guard rows fail on the base and pass here), but the fix uses a route the repository has already ruled out.

Blocking

  • Raising --color-border-emphasized to 3:1 in neutral, butter, matcha, gothic, chocolate and stone darkens every other surface that reads that token (Divider strong, the Blockquote rule, Kbd, TreeList lines, ResizeHandle, tooltip underlines, the Calendar today ring, ClickableCard hover, the FileInput dropzone, chocolate and stone secondary Button borders), which architecture:theme-tokens DEC-2 rules out ("Rejected: raising --color-border-emphasized to 3:1"); keep that token at its current stops and darken only the control edges, through --color-border-control as DEC-2 decides or through the input parts' own borderColor rules until that role exists.
  • The description says only the frame colour and the named text colours move, and the changesets describe only input frames, but the surfaces listed above change too.
  • The required lint check fails at "Check Changeset coverage" because no Changeset names @astryxdesign/cli, which ships the changed bundled themes; add a [fix] Changeset for it.

Owner decision

  • No current record picks the new stops for Butter's accent text and secondary and ghost Button text (Accent Light 35 in light mode) or for Y2K's nav item secondary text (Neutral Light 30), so an engineering owner (you are one) or a design owner needs to record that decision on this pull request, for example by commenting /approve-spec <full head SHA>.

Non-blocking

  • In matchaTheme.ts, the new top-nav-item block now sits under the card's comment, so move it to keep each comment with its rule.
Claims and files checked
  • Review mode: full; reason: no-earlier-review
  • Claim: Base frame ratios per theme in the description's table: verified (the new guard fails on the base in those ranges).
  • Claim: Butter accent text below 4.5:1 on a pressed fill and on the accent tint: verified for nav item text and the tint (4.09:1, 3.75:1); not measured for secondary and ghost Button text.
  • Claim: Matcha and Y2K nav item secondary text below 4.5:1 on the pressed fill: verified (4.34:1, 4.29:1).
  • Claim: Every input frame reaches 3:1 and that text 4.5:1 after the change: verified (guard passes).
  • Claim: The emphasized border is the input frame: false; it is a shared line role, and control edges have their own role.
  • Claim: Only the frame colour and the named text colours move: false (blocking finding 2).
  • Claim: Neutral's progress track looks as before: verified (pinned to the same values).
  • Claim: The smallest-restoration table matches the diff: verified; the chocolate ramp provenance was not regenerated.
  • Claim: Neutral's Switch track takes the darker frame: verified.
  • Claim: Palettes regenerate byte for byte and no surface colour changes: verified.
  • Claim: The guard measures each input frame, links on the tint and pressed nav text: verified.
  • Claim: No visual change hidden under the bug-fix label: false (blocking finding 1).
  • Claim: Changesets: verified as far as they go; they omit the other surfaces, and none names the CLI.
  • File: .changeset/theme-{butter,chocolate,gothic,matcha,neutral,stone}-input-border-contrast.md, theme-y2k-pressed-nav-text-contrast.md: accurate for frames and text, but they leave out the other surfaces that change, and no Changeset names @astryxdesign/cli
  • File: packages/themes/neutral/src/neutralTheme.ts: shared token raised (DEC-2); the Switch track follows it; the progress-track pin keeps the old value
  • File: packages/themes/butter/src/butterTheme.ts: shared token raised and the input rules point at it (DEC-2); accent and Button text stop awaits the owner decision
  • File: packages/themes/matcha/src/matchaTheme.ts: shared token raised (DEC-2); nav text follows the theme record; a comment is misplaced (non-blocking)
  • File: packages/themes/gothic/src/gothicTheme.ts: shared token raised (DEC-2)
  • File: packages/themes/chocolate/src/chocolateTheme.ts: shared token raised (DEC-2); the secondary Button border follows it
  • File: packages/themes/stone/src/stoneTheme.ts: shared token raised in dark mode (DEC-2); the secondary Button border follows it
  • File: packages/themes/y2k/src/y2kTheme.ts: nav secondary text stop awaits the owner decision
  • File: packages/themes/{butter,gothic,matcha,neutral,stone}/src/*PaletteRefs.generated.ts: clear (regeneration checks in sync)
  • File: packages/themes/butter/src/butterTheme.test.ts: clear
  • File: scripts/check-text-contrast-by-role.test.mjs: clear; frame rows treat the shared token as the frame
  • File: packages/cli/assets/templates/themes/** (12 files): byte-equal copies of the theme sources; same findings; need a CLI Changeset
  • File: packages/native/apple/Sources/Astryx/Theme/Generated/*Theme.swift (6 files): clear (values match the theme sources)

Automated review (maintainer link)

@josephfarina
josephfarina marked this pull request as draft November 17, 2026 17:02
@josephfarina josephfarina changed the title fix(themes): input frames read at 3:1 in every official theme fix(themes): accent and nav text read on pressed fills and the accent tint Nov 17, 2026
@josephfarina
josephfarina force-pushed the josephfarina/themes-input-border-contrast branch from 6cf1769 to 5e65b40 Compare November 17, 2026 21:30
@josephfarina
josephfarina marked this pull request as ready for review November 17, 2026 21:30
@josephfarina

Copy link
Copy Markdown
Contributor Author

Owner decision (engineering owner, covering this pull request): three official themes take a darker step of their own palette for text that failed contrast: butter's accent, secondary and ghost button text and navigation text at accent.light[35] in light mode, y2k's secondary navigation text at neutral.light[30], and matcha's at neutral.light[25]. Surfaces keep their colors, and dark mode is unchanged. The guard rows assert that each changed text meets AA (4.5:1 for text, 3:1 for large text and UI marks) on every surface it sits on, including hover, pressed and selected.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 5e65b40

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec c5f1507

@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 finished on this head yet. Each light-mode pair the description lists fails the new guard rows on the base and passes here, dark mode and every fill and border stay as they were, and each new stop follows its theme record or the owner decision recorded on this pull request.

Non-blocking

  • Miss: in butterTheme.ts, the TopNav comments above top-nav-heading and on the selected rule still say unselected items use a lighter blue and that colour marks the selected item, but both now use Accent Light 35, so please update them.
  • The guard's pressed Button rows leave out the hover tint that stays under the pressed overlay during a mouse press, where Butter's secondary label reads 4.54:1 rather than the reported 5.06:1, so adding the tint keeps the guard honest.
  • In matchaTheme.ts, move the top-nav-item block above the card's comment so each comment stays with its rule.
  • The Butter changeset could also name the Selector, MultiSelector and ComplexSelector secondary triggers, whose labels darken with the secondary Button.
Claims and files checked

Review mode: full; reason: history

  • Claim: at the base, Butter's light accent text, secondary and ghost Button labels and nav labels read about 4.1–4.3:1 on a pressed fill and 3.75–3.91:1 on the accent tint: verified (the new guard rows on the base: 4.09–4.27:1 pressed, 3.75:1 on the tint over the page; 3.91:1 over a surface).
  • Claim: at the base, Matcha's and Y2K's light nav secondary text reads 4.29–4.34:1 on the pressed fill: verified (4.34:1 and 4.29:1).
  • Claim: after the change that text reads at 4.5:1 or more: verified (the guard passes; the lowest changed pair is Butter accent text on the tint at 4.64:1).
  • Claim: each colour moves one stop deeper on its own ramp, in light mode only, and dark mode is unchanged: verified (built stylesheets; the Butter dark TopNav frame is pixel-identical).
  • Claim: the change table (Butter 40 to 35, Matcha 30 to 25, Y2K 35 to 30, the stop Y2K's selected rows already use): verified.
  • Claim: no fills, borders or dark values change, and the bundled CLI copies are regenerated: verified (stylesheet diff; the copies are byte-identical to their sources).
  • Claim: the guard with the new rows fails on the base for each pair: verified (14 failing rows).
  • Claim: the guard passes for all seven themes in both modes, and the theme tests pass: verified (23 files, 110 tests).
  • Claim: the guard now measures nav item text at rest, hovered, pressed and selected, Button labels at rest, hovered and pressed on the page and a surface, and links on the accent tint: verified; the pressed Button rows leave out the hover tint (non-blocking).
  • Claim: the scope is theme-butter, theme-matcha, theme-y2k and the CLI, with no new public API: verified (the API generator reports no rows).
  • Claim: the listed tests, palette checks and changeset check pass: verified for the vitest run, the palette-refs checks and the changeset check; the typechecks pass in CI.
  • Claim: the look gate passed, measured together with two other pending fixes: not checked here, since it was measured on a different tree.
  • Changeset (CLI): the bundled butter, matcha and y2k themes' accent and nav text reach 4.5:1: verified.
  • Changeset (Butter): accent text, secondary and ghost Button text and nav text take accent stop 35, a step deeper than the accent fill: verified (the accent fill is stop 40); the Selector triggers are not named (non-blocking).
  • Changeset (Matcha): nav secondary text takes the next neutral stop: verified.
  • Changeset (Y2K): nav secondary text takes the stop a selected row uses: verified.
  • File: .changeset/cli-bundled-themes-pressed-text-contrast.md: clear
  • File: .changeset/theme-butter-pressed-accent-text-contrast.md: omits the Selector triggers (non-blocking)
  • File: .changeset/theme-matcha-pressed-nav-text-contrast.md: clear
  • File: .changeset/theme-y2k-pressed-nav-text-contrast.md: clear
  • File: packages/themes/butter/src/butterTheme.ts: TopNav comments now stale (non-blocking)
  • File: packages/themes/butter/src/butterTheme.test.ts: clear
  • File: packages/themes/matcha/src/matchaTheme.ts: nav block under the card's comment (non-blocking)
  • File: packages/themes/y2k/src/y2kTheme.ts: clear
  • File: scripts/check-text-contrast-by-role.test.mjs: pressed rows leave out the hover tint (non-blocking)
  • File: packages/cli/assets/templates/themes/butter/butterTheme.ts, matcha/matchaTheme.ts, y2k/y2kTheme.ts: byte-identical copies; same notes as their sources

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 9d504af

@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: lint and smoke-test pass, but the CI workflow found no room on this head ("CI is full") and needs a re-run before merge.

The butter, matcha and y2k light-mode text fixes hold: each of the 14 pairs the new guard rows fail on main now reads at 4.5:1 or more, and the latest commit fixes both CI failures from the previous push (the CLI scope test's old hex and the stale Swift Butter theme). There are no blocking findings; these non-blocking points are worth a follow-up:

  • Butter's TopNav comments (packages/themes/butter/src/butterTheme.ts:545-547 and :561-562) still say unselected items use a lighter blue, but both now use Accent Light 35, so only weight marks the current item.
  • The guard's pressed Button rows (scripts/check-text-contrast-by-role.test.mjs:440) leave out the hover tint a mouse press keeps, so they report 5.06:1 for Butter's pressed secondary label while it really reads 4.54:1.
  • The Matcha nav rule sits under the card's comment (packages/themes/matcha/src/matchaTheme.ts:309-318), the new butterTheme import splits a comment from its vi.mock in the CLI scope test, and the Butter changeset does not name the Selector, MultiSelector and ComplexSelector secondary triggers that also darken.
Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim, CLI changeset: the bundled butter, matcha and y2k themes' accent and nav text reach 4.5:1 on pressed fills and the accent tint. Verified: the three bundled copies regenerate byte for byte from the theme sources.
  • Claim, butter changeset: accent text, secondary and ghost Button text and nav item text reach 4.5:1 on a pressed fill and the accent tint at accent stop 35, a step deeper than the accent fill. Verified: butterTheme.ts:51, :211, :345, :559, :585; --color-accent stays stop 40 (:314); the guard passes. It omits the Selector triggers (non-blocking).
  • Claim, matcha changeset: nav item secondary text reaches 4.5:1 on the pressed fill at the next neutral stop. Verified: matchaTheme.ts:315 sets stop 25 over the global stop 30 (:100); 5.62:1.
  • Claim, y2k changeset: nav item secondary text takes the selected-row stop and reaches 4.5:1 on the pressed fill. Verified: y2kTheme.ts:516 uses LIFTED_ON_PAGE (:39), as selected rows do (:466); 5.15:1.
  • Claim: before the change, butter's text read 4.09–4.27:1 on a pressed fill and 3.75–3.91:1 on the accent tint, and matcha's and y2k's nav secondary text 4.29–4.34:1. Verified: the head guard fails these rows on the base; 3.91:1 is the tint over a surface.
  • Claim: after the change that text reads 4.5:1 or more. Verified: the guard passes at the head.
  • Claim: each colour moves one step deeper on its theme's own ramp, in light mode only, and dark mode is unchanged. Verified: every dark value in the three built stylesheets is identical.
  • Claim: butter 40 → 35, matcha 30 → 25 and y2k 35 → 30 (the stop selected rows use), with no fill, border or dark value changed. Verified: theme sources and the built stylesheet diff.
  • Claim: the bundled CLI copies are regenerated and committed. Verified: the CLI theme generator rewrites them identically.
  • Claim: the guard with the new rows fails on main for each pair. Verified: 14 rows fail on the base.
  • Claim: the guard passes for all seven themes in both modes and the theme package tests pass. Verified: guard 2 of 2; theme packages 21 files, 105 tests.
  • Claim: the guard now measures links on the accent tint, nav item text at rest, hovered, pressed and selected, and ghost and secondary Button labels at rest, hovered and pressed on the page and on a surface. Verified: check-text-contrast-by-role.test.mjs:363-449 (the pressed rows omit the hover tint, non-blocking).
  • Claim: the CLI typechecks pass. Verified for template docs, JSON API, authoring and API declarations; the strict check reports only two errors in unchanged page templates that import a theme build this check did not have.
  • Claim: the changeset check passes. Verified.
  • Claim: the look gate passed when measured with two other pending fixes. Not reproducible on this head alone; this review's own light and dark frames show the change.
  • File .changeset/cli-bundled-themes-pressed-text-contrast.md: clear.
  • File .changeset/theme-butter-pressed-accent-text-contrast.md: non-blocking, omits the Selector triggers.
  • File .changeset/theme-matcha-pressed-nav-text-contrast.md: clear.
  • File .changeset/theme-y2k-pressed-nav-text-contrast.md: clear.
  • File packages/cli/api/theme-edit/theme-contrast-scope-change-carries.test.mjs: non-blocking, the import splits a comment from its mock; the test passes.
  • File packages/cli/assets/templates/themes/butter/butterTheme.ts: identical to its source; carries the source's comment note.
  • File packages/cli/assets/templates/themes/matcha/matchaTheme.ts: identical to its source; carries the source's comment note.
  • File packages/cli/assets/templates/themes/y2k/y2kTheme.ts: clear, identical to its source.
  • File packages/native/apple/Sources/Astryx/Theme/Generated/ButterTheme.swift: clear, regenerated; the drift test passes.
  • File packages/themes/butter/src/butterTheme.test.ts: clear.
  • File packages/themes/butter/src/butterTheme.ts: non-blocking, stale TopNav comments.
  • File packages/themes/matcha/src/matchaTheme.ts: non-blocking, the nav rule sits under the card's comment.
  • File packages/themes/y2k/src/y2kTheme.ts: clear.
  • File scripts/check-text-contrast-by-role.test.mjs: non-blocking, pressed rows omit the hover tint.

Automated review (maintainer link)

@josephfarina josephfarina changed the title fix(themes): accent and nav text read on pressed fills and the accent tint fix(themes): butter and neutral text reads at 4.5:1 on pressed fills and the accent tint Nov 18, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 3e8d2e0

… tint

Butter's accent text, secondary and ghost button text and nav item text take accent stop 35 in light mode; matcha's and y2k's nav item secondary text take the stop that reads on the pressed fill over the page. The guard measures links on the accent tint and a pressed nav item's text.
…sed and selected, and ghost and secondary button labels in each state
Rendered on a fresh main build, y2k's and matcha's nav items sit on the top bar's surface and read at 6.41 and 4.96:1 when pressed, so their changes are dropped. Neutral's dark nav item reads 4.12:1 when pressed and takes the next lighter secondary stop. The guard measures each nav item in the colour it draws, on the top bar.
…he page

AppShell's default elevated and wash top bars paint the page, where y2k's and matcha's pressed nav text read 4.27 and 4.31:1 rendered. Their nav item secondary text takes the next stop again. The guard measures nav items on the page and on a surface. Neutral's palette-refs test counts the new stop.
…xt on the pressed fill it sits on

The official Neutral theme now lifts top nav item secondary text for the
pressed fill. Core's palette mapping lists that lift and lifts it against
the pressed fill over the page and the surfaces, not the accent tint. The
pressed fill replaces the hover fill, so no hover is measured over it. The
CLI's palette engine is regenerated from Core. A new accent keeps the
official lift, and a new neutral moves it with the other lifts. The
accent-lift test counts six lifts and covers the neutral dial; the palette
test expects the pressed-fill lift beside the tint lift. A changeset names
the Core and CLI change.

[skip ci]
… the new stops give

theme:butter names Accent Light 35 for light accent text, links, the
secondary and ghost Button labels and TopNav items, theme:neutral the dark
top nav item text, and theme:y2k the light TopNav item text, each with the
ratios the contrast guard measures, under spec:AST-020 FR1. The guard joins
each record's verified_by. Core's changeset names themePalette(), and the
theme editor change has its own experimental changeset. Butter's TopNav
comments say what the items now draw. The guard counts the hover fill a
mouse press keeps under a pressed Button.

[skip ci]
Only Butter's accent text and button labels changed; all four themes' nav
item text did.

[skip ci]

@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: every colour change has authority at this head, the 15 text pairs the contrast guard fails on main pass here, and the rendered pressed nav items and Butter Buttons read at 4.5:1 or more. CI has not run on this head because its commit message carries [skip ci], so push the next commit without that marker so the required checks run before merge.

Non-blocking suggestions:

  • The Neutral Changeset and the comment in neutralTheme.ts say nav text now reads at 4.5:1 "when pressed on the dark top bar", but on main only surface and section top bars failed (4.11:1) while AppShell's default top bar already read 4.79:1; consider "when pressed on a surface or section top bar in dark mode".
  • Core's Changeset says "A palette made like Neutral", which is the theme editor's option rather than a themePalette() input; consider "The lift follows the palette's neutral seed, not its accent."
  • The liftGround comment in packages/core/src/palette/mapping.ts is one 42-word sentence. Miss: the LIFT_PARTS comment above it is one 55-word sentence too. Split each into one short sentence per ground.
Claims and files checked

Review mode: full; reason: rebase

  • Claims:
    • Title, Butter, Neutral, Matcha and Y2K text reads at 4.5:1 on pressed fills and the accent tint: verified (the guard fails 15 pairs on the base and none here; rendered pressed nav text 5.05:1 to 5.58:1).
    • Bundled-themes Changeset, the bundled Butter accent text and secondary and ghost labels, and the four bundled themes' nav text, read at 4.5:1: verified (the CLI copies match the package sources byte for byte).
    • Experimental Changeset, a theme made like Neutral in the editor lifts top nav secondary text on the pressed fill, keeps it on a new accent and moves it on a new neutral: verified (both theme editor lift tests run and pass).
    • Butter Changeset, accent text, secondary and ghost labels (and the secondary Selector-family triggers) and nav text take accent stop 35 in light and read at 4.5:1 pressed and on the tint: verified (butterTheme.ts:51, :213, :350, :571, :599; lowest row 4.54:1).
    • Core Changeset, themePalette() lifts top nav secondary text on the pressed fill as Neutral does: verified (palette and drift tests pass); the "made like Neutral" wording is a suggestion above.
    • Matcha Changeset, nav secondary text takes the next stop in light and reads at 4.5:1 pressed over the page: verified (4.34:1 to 5.62:1).
    • Neutral Changeset, nav text reads at 4.5:1 pressed in dark with the next lighter stop: verified (4.11:1 to 4.79:1 on a surface top bar); the top bar wording is a suggestion above.
    • Y2K Changeset, nav secondary text takes the selected-row stop in light and reads at 4.5:1 pressed over the page: verified (4.29:1 to 5.15:1; y2kTheme.ts:39, :525).
    • Description, Butter text read 3.83:1 to 4.27:1 pressed and 3.75:1 on the tint: verified in substance; those are the surface-ground figures, and on the page the pressed secondary Button read 3.67:1.
    • Description, Neutral dark nav text read 4.12:1 pressed on the top bar: true on surface and section top bars (4.11:1); the default top bar already read 4.79:1 (suggestion above).
    • Description, Y2K and Matcha nav text read 4.27:1 and 4.31:1 pressed on the default top bar: verified (rendered 4.27:1 and 4.31:1).
    • Description, each colour moves one stop on its own ramp only in the failing mode, and no fill or border changes: verified.
    • Description, the bundled CLI copies are regenerated: verified (byte-identical).
    • Description, the extended guard fails on the base for each pair and passes for all seven themes in both modes, and the theme package tests pass: verified.
    • Description, the guard measures links on the tint, nav items in each state on the page and a surface, and ghost and secondary labels in each state: verified (check-text-contrast-by-role.test.mjs:369-471).
    • Description, testing commands (the Vitest run, the CLI typechecks, the theme copy generation and the Changeset check): verified (each passes when run here).
    • Description, the theme editor lifts top nav secondary text on the pressed fill with no hover measured: verified (mapping.ts:1606; the editor tests pass).
    • Description, the three records state the new stops and ratios under the AA baseline and list the guard; Core's Changeset names themePalette(); the editor change has its own experimental Changeset: verified (every stated ratio matches the guard).
    • Description, the Scope line lists the four themes and the CLI: accurate for the themes; it leaves out Core's themePalette() change, which the description covers elsewhere.
    • Description, the author's own visual check: not reproducible here; rendered frames of both trees show the four themes' changes and Neutral light unchanged.
  • Files:
    • .changeset/theme-neutral-pressed-nav-text-contrast.md: non-blocking, top bar wording.
    • .changeset/theme-editor-top-nav-lift.md: non-blocking, "made like Neutral" wording.
    • .changeset/cli-bundled-themes-pressed-text-contrast.md, experimental-theme-editor-top-nav-lift.md, theme-butter-pressed-accent-text-contrast.md, theme-matcha-pressed-nav-text-contrast.md, theme-y2k-pressed-nav-text-contrast.md: clear.
    • packages/core/src/palette/mapping.ts: non-blocking, comment length; packages/cli/api/theme/palette/generate/mapping.mjs (generated copy matches): clear.
    • packages/cli/api/theme-edit/_palette.mjs, theme-accent-lift.test.mjs, theme-palette.test.mjs: clear.
    • packages/cli/assets/templates/themes/butter/butterTheme.ts, matcha/matchaTheme.ts, neutral/neutralTheme.ts, neutral/neutralPaletteRefs.generated.ts, y2k/y2kTheme.ts: clear (byte-identical copies).
    • packages/native/apple/Sources/Astryx/Theme/Generated/ButterTheme.swift: clear (Accent Light 35).
    • packages/themes/butter/butter.spec.md, packages/themes/neutral/neutral.spec.md, packages/themes/y2k/y2k.spec.md: clear (every stated ratio matches the guard; approved for this head).
    • packages/themes/butter/src/butterTheme.ts, butterTheme.test.ts, packages/themes/matcha/src/matchaTheme.ts, packages/themes/neutral/src/neutralTheme.ts, neutralPaletteRefs.generated.ts, packages/themes/y2k/src/y2kTheme.ts: clear.
    • scripts/check-text-contrast-by-role.test.mjs, scripts/generate-neutral-palette-refs.test.mjs: clear.

Automated review (maintainer link)

Comment on lines +413 to +414
* neutral track (`--color-neutral`), and in top nav items, which sit on the
* pressed fill (`--color-overlay-pressed`) while pressed.

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.

Miss (non-blocking): this comment is now one 55-word sentence, over the 25-word limit for a description in source comments, like the liftGround comment below it. One sentence per ground reads more easily, for example:

/**
 * The parts whose secondary text the official Neutral theme lifts, with
 * the block and the ground of each. Most parts sit on the accent tint.
 * Segmented-control labels sit on the translucent neutral track
 * (`--color-neutral`). A pressed top nav item sits on the pressed fill
 * (`--color-overlay-pressed`).
 */

@rubyycheung rubyycheung 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.

Design approval for the palette-step contrast changes. Compared the exact base and this head in Butter light, Neutral dark, Matcha light and Y2K light, including native hover and press. The tested navigation labels, Butter secondary/ghost labels and accent-tint text clear 4.5:1, with fills and dimensions unchanged. Butter light selection now relies on weight rather than a different text color; that trade-off is accepted. This is design approval, not full CI or device validation.

This branch was successfully deployed

1 active deployment
Preview — a8abf296 Deployed Nov 21, 2026 by vercel[bot]
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants