Repository navigation
fix(button, close-button): update static variant colors - #6846
rise-erpelding wants to merge 4 commits into
Conversation
|
📚 Branch Preview Links🔍 Gen1 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
There was a problem hiding this comment.
I noticed our button VRTs weren't covering all the variants x treatments x states, so I made a few updates. Looks like the change is a bit more drastic for global button because of the way the VRTs were set up initially.
The combinations that are missing (primary outline disabled, or primary/secondary outline hover/focus/active seem important to include and are in some cases combinations that were touched in this PR, which is why I opted to include them, but I'm also open to leaving them out if we'd rather tackle them separately!
There was a problem hiding this comment.
I did ultimately decide to pare back the global styles a little bit, open to doing more if we think that's needed!
cdransf
left a comment
There was a problem hiding this comment.
Looks good! Do we need to make the same change in action button? ✨
|
After looking at #6848's token updates where @cdransf It's a good question about action button; I'm not sure where we might consume the static color variants that it could present a problem, but something for us to keep an eye on for sure! |
f4786ab to
6be9c86
Compare
Use transparent-static-white-1000 and transparent-static-black-1000, the 15.6.0 replacements for the deprecated white and black tokens. Rendered colors are unchanged.
6be9c86 to
a67fab3
Compare
Description
Use opaque white or black for enabled static-color content in the shared gen2 components:
swc-buttonlabels in default, hover, pressed (active), and focus-visible states.swc-close-buttonicons in the same states.@adobe/spectrum-wc.Border, background (including translucent interaction overlays), focus-indicator, and disabled-state colors are unchanged. No API or interaction behavior changes.
Motivation and context
The previous static treatments used translucent white/black content: the 800 tokens (for instance
transparent-white-800) by default and the 900 tokens (transparent-white-900) on hover, press, and keyboard focus. This can cause issues with contrast; for instance in toast integration testing, the static-white action label measured approximately 3.91:1 on positive toasts, below the WCAG AA 4.5:1 requirement for its 14px bold text. Opaque white, on the other hand, measured approximately 4.81:1 against those backgrounds.Related issue(s)
Screenshots
Static white button
Static white button, before:
Static white button, after (new VRTs added to help validate hover/focus/active states):
Static black button
Static black button, before:
Static black button, after (new VRTs added to help validate hover/focus/active states):
Static white close button
Static white close button, before:
Static white close button, after:
Static black close button
Static black close button, before:
Static black close button, after:
Author's checklist
Validation performed:
git diff --checkpassed.No committed regression tests were added. No public API documentation changes are required. Browser, screen-reader, forced-colors, and toast integration QA remain outstanding; this description does not claim a full test-suite pass.
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Static button label colors
rgb(255, 255, 255)orrgb(0, 0, 0), respectively, in every enabled state. Verify the global button stylesheet produces the same colors.Static close-button icon colors
Unchanged colors, behavior, and forced-colors rendering