Skip to content

feat(button): use DS background token for contrast#8059

Open
tamas-sage wants to merge 2 commits into
masterfrom
fix/FE-7680-button-contrast-bg
Open

feat(button): use DS background token for contrast#8059
tamas-sage wants to merge 2 commits into
masterfrom
fix/FE-7680-button-contrast-bg

Conversation

@tamas-sage

Copy link
Copy Markdown
Contributor

Proposed behaviour

In Button/Test -> AllSizesVariantsTypes, some button groups (including secondary destructive examples) are rendered on hardcoded grey backgrounds (#DDDDDD). This can produce contrast failures and does not represent an official DS background token.
image
image

Current behaviour

Use Design System background tokens in the story (e.g. var(--mode-color-generic-bg-nought)) instead of hardcoded greys, so contrast checks run against approved DS colors and reflect intended design usage.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

@tamas-sage tamas-sage requested a review from a team as a code owner July 2, 2026 07:40
@tamas-sage tamas-sage marked this pull request as draft July 2, 2026 07:42
@tamas-sage tamas-sage changed the title use DS background token for contrast feat(button): use DS background token for contrast Jul 2, 2026
@DipperTheDan DipperTheDan self-requested a review July 3, 2026 11:43
@edleeks87 edleeks87 marked this pull request as ready for review July 3, 2026 11:58

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

@tamas-sage apologies I've just realised this has a feat commit which will trigger a release which we don't need for this change. Either chore/docs/refactor will be better for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants