Repository navigation
Conversation
🦋 Changeset detectedLatest commit: d098ece The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Contributor
Chromatic Storybook
Built from commit: Statuses as of the end of the run. The build link shows the live review state. |
Contributor
|
Hi @JayPokale , thank you for the PR! VRT caught some expected diffs, can you please run |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
secondary,emptyanddangervariants ofButtonshow no usable focus ring when focused with the keyboard (#1305). Each variant drew its:focus-visibleoutline from its ownstroke-activetoken:#cccfd3in light (1.56:1) and#3a383cin dark (about 1.4:1), under the 3:1 that WCAG 1.4.11 asks for.Before the CSS Modules setup in #810,
ButtonextendedBaseButtonand got the global ring from #894. Since #810 it renders its own<button>, so that rule no longer reaches it.This sets the outline color of those three variants to
--click-global-color-outline-default, the same ringBaseButton,IconButton,Checkbox,Switchand the other form controls use (#437eeflight,#faff69dark). Width and offset are unchanged. The fill and border changes on focus are unchanged.primaryis unchanged. Its ring already comes from a visible token, and whether it should also use the global ring is a design call (the issue raises the same question).Links and tickets
Closes #1305
Good to know
Button.module.css(3 lines), no token edits. A:focus-visibleoutline color cannot be asserted in jsdom, so there is no new unit test. The existingButtonandButtonGrouptests pass (35).Checklist
primaryto use the global ring too.Contribution
buildandbuild-storybookwork locallyAccessibility
Note
Low Risk
CSS-only focus-ring color on three button variants; no logic, API, or token definition changes.
Overview
Keyboard focus visibility for
Buttonsecondary,empty, anddangeris fixed by swapping each variant’s:focus-visibleoutline from its own low-contraststroke-activetoken to--click-global-color-outline-default, matchingIconButton,Checkbox, and the other form controls.Outline width, offset, and focus-time border/background styling are unchanged.
primarystill uses its variant stroke for the ring. A patch changeset documents the visual update.Reviewed by Cursor Bugbot for commit d098ece. Bugbot is set up for automated code reviews on this repo. Configure here.