Skip to content

fix(fuselage-tokens): badge level-1 contrast a11y failing - #2144

Merged
juliajforesti merged 4 commits into
mainfrom
fix/ghost-badge-contrast
Aug 12, 2026
Merged

juliajforesti merged 4 commits into
mainfrom
fix/ghost-badge-contrast

Conversation

@ivans-netto

@ivans-netto ivans-netto commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Task

The dark theme's badge-level-1 (the secondary badge background) was #484C51, a color that doesn't match anything in the palette. It now uses #6C737A — the value of the n700 primitive, the same source the light theme references. The literal (rather than a {colors.n700} reference) is intentional: the dark palette doesn't reference primitives.

Theme badge-level-1 Source
Light #6C737A {colors.n700} (unchanged)
Dark #484C51 → #6C737A aligned with the n700 value
High contrast #2F343D {colors.n800} (unchanged, intentional)

White text over #6C737A sits at 4.8:1, above the WCAG AA minimum of 4.5:1 for the badge's micro font size.

Before / After

secondary badge in the dark theme: before with #484C51, after with the n700 value (#6C737A)

Storybook

Testing

  • Badge unit tests and full visual regression suite passing (504 tests); WithValue golden regenerated — goldens capture the light theme, which is unchanged by the token fix
  • Changeset included (patch on @rocket.chat/fuselage-tokens, same message as this PR title)

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4feeae4

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

This PR includes changesets to release 1 package
Name Type
@rocket.chat/fuselage-tokens 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

Comment thread .changeset/ghost-badge-contrast.md Outdated
Comment thread packages/fuselage/src/components/Badge/Badge.styles.scss
@ivans-netto ivans-netto changed the title fix(fuselage): improve ghost badge contrast fix(fuselage-tokens): use n700 primitive as badge level-1 background Aug 7, 2026
@ivans-netto
ivans-netto force-pushed the fix/ghost-badge-contrast branch from 94552a0 to 11b2385 Compare August 7, 2026 16:14
Comment thread packages/fuselage-tokens/src/badge/base.json Outdated
@ivans-netto
ivans-netto force-pushed the fix/ghost-badge-contrast branch from 11b2385 to 74db7bb Compare August 10, 2026 13:59
@ivans-netto ivans-netto changed the title fix(fuselage-tokens): use n700 primitive as badge level-1 background fix(fuselage-tokens): align dark badge level-1 background with the n700 value Aug 10, 2026
ivans-netto and others added 2 commits August 11, 2026 09:23
…00 value

The dark theme's badge level-1 (the secondary badge background) was
#484C51, which doesn't match any palette color. It now uses #6C737A —
the n700 primitive's value, the same source the light theme references.
The literal is intentional: the dark palette doesn't reference
primitives.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ivans-netto
ivans-netto force-pushed the fix/ghost-badge-contrast branch from 74db7bb to 9c71722 Compare August 11, 2026 12:24
Resolves the conflict in the badge color tokens: #2148 moved
`src/badge/base.json` to `src/colors/badge.json` and added an explicit
`"type": "color"` to the dark values, while this branch changed dark
`level-1` to the n700 value. Kept the new file layout and format with
the n700 (`#6C737A`) value.
@ivans-netto
ivans-netto dismissed juliajforesti’s stale review August 12, 2026 13:21

Feedback already covered

@juliajforesti juliajforesti changed the title fix(fuselage-tokens): align dark badge level-1 background with the n700 value fix(fuselage-tokens): badge level-1 contrast a11y failing Aug 12, 2026
Comment thread .changeset/badge-level-1-n700.md Outdated
@juliajforesti
juliajforesti merged commit 695158b into main Aug 12, 2026
7 checks passed
@juliajforesti
juliajforesti deleted the fix/ghost-badge-contrast branch August 12, 2026 13:34
@github-actions github-actions Bot mentioned this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants