Skip to content

fix(tokens): pass WCAG contrast for feedback color aliases (DSYS-204)#1935

Draft
cmwinters wants to merge 1 commit into
mainfrom
cwinters/fix/feedback-bg-contrast
Draft

fix(tokens): pass WCAG contrast for feedback color aliases (DSYS-204)#1935
cmwinters wants to merge 1 commit into
mainfrom
cwinters/fix/feedback-bg-contrast

Conversation

@cmwinters

@cmwinters cmwinters commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes DSYS-204 — the feedback color aliases failed WCAG AA when paired (worst for warning/yellow).

Tokens (@launchpad-ui/tokens)

  • bg-feedback-*: *.50*.0 (light), *.900*.950 (dark) — lighter/darker backgrounds so paired text-feedback clears 4.5:1.
  • border-feedback-*: *.500*.100 (light), *.400*.800 (dark) — softened to pair with the new backgrounds.
  • fill-feedback-warning: → *.600 (both themes) for legibility.
  • Decoupled border-field-error and border-interactive-destructive from border-feedback-error; they now map to red-500 (light) / red-400 (dark) so invalid-field and destructive borders keep their vivid ~3:1 state indication rather than inheriting the now-subtle feedback border.

Components (@launchpad-ui/components)

  • Alert now sources its bg/border from the bg-feedback-* / border-feedback-* tokens (neutral → bg-ui-secondary / border-ui-primary) instead of hardcoded primitives.
  • Toast status icons use text-feedback-* for contrast against the toast surface.
  • TagGroup tags get a 1px border — feedback variants use border-feedback-*, default uses border-ui-primary; beta and federal are intentionally borderless.

Screenshots (if appropriate)

Chromatic will surface the visual diffs for Alert, Toast, TagGroup, and Calendar (invalid cell). Verifying in Storybook across light/dark is pending reviewer sign-off.

Testing approaches

  • Rebuilt tokens (pnpm build:transform) and verified resolved values in dist/themes.css: border-field-error / border-interactive-destructive resolve to vivid red while border-feedback-error stays subtle.
  • vitest for Alert, Toast, and TagGroup pass (includes axe a11y checks).
  • Biome clean on all changed files.
  • Changesets added for both packages.

Lighten bg-feedback and soften border-feedback so feedback pairings meet WCAG AA.
Darken fill-feedback-warning and decouple field/destructive borders so they stay vivid.
Migrate Alert onto the feedback/ui tokens and route Toast icons to text-feedback.
Add borders to TagGroup tags (except beta/federal).
@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7fce575

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@launchpad-ui/tokens Patch
@launchpad-ui/components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 16, 2026

Copy link
Copy Markdown
yarn add https://pkg.pr.new/@launchpad-ui/components@1935.tgz
yarn add https://pkg.pr.new/@launchpad-ui/icons@1935.tgz
yarn add https://pkg.pr.new/@launchpad-ui/tokens@1935.tgz

commit: 7fce575

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.

1 participant