-
Notifications
You must be signed in to change notification settings - Fork 645
fix(SegmentedControl): set global focus styles #5029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(SegmentedControl): set global focus styles #5029
Conversation
🦋 Changeset detectedLatest commit: f3197ef 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 |
size-limit report 📦
|
…practice-dont-use-the-default-focus-state-style
|
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/344457 |
…practice-dont-use-the-default-focus-state-style
|
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
|
Uh oh! @francinelucca, the image you shared is missing helpful alt text. Check your pull request body. Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
|
Closes https://github.com/github/primer/issues/3381
Adds focus styles for
SegmentedControlButtonandSegmentedControlIconButtoncomponents via callinggetGlobalFocusStyles()to ensure focus styles comply with accessibility color contrast. This function explicitly adds focus state using color:colors.accent.fg. This fixes contrast issues when using safari's default focus state.Before:

After:

Changelog
Changed
getGlobalFocusStyles()inSegmentedControlIconButtonStyledandSegmentedControlButtonStyleddefinitions.Rollout strategy
Testing & Reviewing
SegmentedControlstories in preview deployment in safari, compare focus states to prodMerge checklist