Skip to content

fix(ActionBar): fix icon color in close button in emphasized ActionBar - #10429

Merged
snowystinger merged 2 commits into
mainfrom
fix-close-button-static-color
Aug 5, 2026
Merged

fix(ActionBar): fix icon color in close button in emphasized ActionBar#10429
snowystinger merged 2 commits into
mainfrom
fix-close-button-static-color

Conversation

@reidbarber

Copy link
Copy Markdown
Member

Fixes a contrast failure in the S2 ActionBar's clear button. In dark mode with isEmphasized, the close button's icon was hardcoded to white, which failed contrast against the ActionBar background color.

Changed to transparent-overlay-1000, which auto-computes black or white based on the --s2-container-bg inherited from the container.

Also added a chromatic story.

Before:

Screenshot 2026-08-05 at 5 28 23 PM

After:

Screenshot 2026-08-05 at 5 30 35 PM

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Verify in docs/storybook and check new Chromatic story.

🧢 Your Project:

@github-actions github-actions Bot added the S2 label Aug 5, 2026

@snowystinger snowystinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, not sure how i missed that when i updated the other button

@snowystinger
snowystinger added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit 1b4b16c Aug 5, 2026
32 of 33 checks passed
@snowystinger
snowystinger deleted the fix-close-button-static-color branch August 5, 2026 23:29
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.

4 participants