Skip to content

Neutral gray ramp; a11y fixes for compontent outlines - #51

Merged
microbit-matt-hillsdon merged 3 commits into
mainfrom
gray-ramp-v2
Aug 7, 2026
Merged

Neutral gray ramp; a11y fixes for compontent outlines#51
microbit-matt-hillsdon merged 3 commits into
mainfrom
gray-ramp-v2

Conversation

@microbit-matt-hillsdon

@microbit-matt-hillsdon microbit-matt-hillsdon commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Best viewed as a cross-ui/app change:

  • @microbit/ui (library) — neutral gray ramp behind Chakra's stop names (no renames; 25 stays), a11y re-grades (400 3:1 outlines, 500 4.5:1 text) on Input/Select/Checkbox/Radio, a new 350 press/fill-weight stop, mainly for grey buttons in classroom, Avatar/Skeleton defaults moved off the ink stop to 350
  • python-editor — designed light greys kept as is (sidebar/simulator panels untouched); private preset drops its 400–800 for the family ink; muted-text and zoom-pill re-points; gutter numbers deliberately parked light on 350 (known 1.4.3 exception, to revisit); terminal scrollbar lightened + the long-standing Firefox scrollbar-color inversion fixed.
  • classroom — split ramp: 10–350 tinted to the brand purple #6C4BC1 (luminance-matched, guarantees hold), 400–900 family neutral; homepage deliberately stays on its neutral literals; dead zoom variant deleted. This is a compromise for the panel surfaxces and makes more sense than the Chakra blue tint given that we have lilac/purple highlights already. Please review by eye, is it too different?
  • ml-trainer — split ramp on the CreateAI blue #2a94d6, brand-owned (OSS stays neutral); backdrop family pinned on the whitesmoke literal to reduce change; Windi-era 500/600 patches dropped with re-points, ; same/different option cards promoted to gray.400, chevrons to gray.500.
  • data-microbit-org — wholesale neutral, zero grey overrides: its surfaces were always neutral by design, so the switch just de-blues the table/stepper trim in not-live playground and converges the React table with its offline MY_DATA twin.

The only real unifying principles for the app changes:

  • Don't unintentionally ship Chakra blue
  • Don't change large panel areas from tinted to neutral or vice-versa
  • Accessible component outlines

Closes #42

Demos

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploying ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0287edc
Status: ✅  Deploy successful!
Preview URL: https://6920f966.ui-2wg.pages.dev
Branch Preview URL: https://gray-ramp-v2.ui-2wg.pages.dev

View logs

Replace Chakra's blue-tinted gray with a pure-neutral ramp behind the
existing stop names (no renames; the historical 25 keeps its
darker-than-50 name). The light stops (10-300) match Chakra's luminance
exactly so large surfaces don't shift; the dark half is re-graded for
accessibility:

- 400 is now 3.05:1 on white and becomes the form-control outline stop
  (WCAG 1.4.11): Input, Select/ComboBox triggers and Checkbox/Radio
  roots move from gray.200 to gray.400, hover stepping darker to 500.
  Dropdown cards keep gray.200 - a surface edge, not a control boundary.
- 500 is now 4.54:1, so placeholders and secondary text pass AA.
- A new 350 stop (~2.1:1) takes the decorative fills that sat on
  Chakra's 400 weight: Avatar's no-name default, Skeleton's pulse.
  Never text or boundaries.

The override contract lives on the ramp definition in base-preset.ts:
presets override values, never names; light stops freely (pin or tint),
dark stops only luminance-matched to the contrast grading.

brand2 stays Chakra's slate gray as a frozen alias, deliberately
decoupled from gray, so the OSS ml-trainer look and statusBarBg's
default don't move. Removing it is a follow-up needing an ml-trainer
lockstep.

A Foundations/Colors Storybook story renders the resolved ramp with
measured contrast, so brand-preset overrides stay visible.

App-side adoption (pinned light stops, brand tints, per-site re-points)
is each app's own reviewed change.
Our historical 25 sat darker than 50; now the values are ours, take the
monotone name. No transition alias - every app and paired private preset moves
in the same lockstep, raw var(--colors-gray-*) references included (a missed
one fails black or transparent).
@microbit-matt-hillsdon
microbit-matt-hillsdon merged commit d1c27a0 into main Aug 7, 2026
2 checks passed
@microbit-matt-hillsdon
microbit-matt-hillsdon deleted the gray-ramp-v2 branch August 7, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

One family grey ramp, with form-control borders that have enough contrast

1 participant