chore(opacity-checkerboard): add vrt coverage - #6619
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 |
pfulton
left a comment
There was a problem hiding this comment.
Seems good to me! I left a comment about the suggested change to the demo component, but I'm fine with whatever y'all decide to do on that.
d6e7cc0 to
77f56ec
Compare
All set and reverted. ✨ |
Description
Adds dedicated
test/vrt/coverage for theopacity-checkerboardshared CSS utility, following thebuttonVRT pattern:opacity-checkerboard.vrt.tscovers size (m/s) across light/dark themes (the alternating square resolves one color vialight-dark(), so dark theme is a real visual axis, not just a direction check), plus representative transparent-content fills, and aForcedColorsstory covers theforced-color-adjust: noneoverride;opacity-checkerboard-custom-properties.vrt.tscovers reference/override rows for the two exposed custom properties (--swc-opacity-checkerboard-square-dark-light/-dark-dark), each rendered in the color-scheme where it actually applies. No global-styles VRT file is included since this utility has no plain-class global stylesheet to cover. Also extracts the internal demo host (demo-opacity-checkerboard-swatch) and itsswatch()helper out of the docs.stories.tsfile into a shared module so both the docs and VRT stories use one implementation instead of two copies.Motivation and context
Closes the VRT coverage gap for
opacity-checkerboardcalled out in SWC-2422.Related issue(s)
Author's checklist
Accessibility testing checklist
role="img"+aria-labelon the swatch, andaria-hidden="true"on the checkerboard layer, are untouched. Open Storybook → Opacity checkerboard → Opacity checkerboard VRT with VoiceOver/NVDA active, navigate to a swatch, and expect it to announce as an image with its label while the checkerboard layer itself is never announced.