-
Notifications
You must be signed in to change notification settings - Fork 538
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 #5140
fix(SegmentedControl): set global focus styles #5140
Conversation
This reverts commit 9f37707.
🦋 Changeset detectedLatest commit: ec9afc8 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 |
👋 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! |
size-limit report 📦
|
🟢 golden-jobs completed with status |
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.
|
1 similar comment
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.
|
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/347474 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks wonderful! 🌸
Should we add an e2e test for the focus state? Especially because we use a utility function for the focus styles which is great - just to be double sure that we don't introduce any visual regression if we ever make a change on the global utility focus styles. Let me know your thoughts 🙌🏻
Yesss , great idea ✨ |
Yeah perfect! 🔥 Side note: Not sure if we need the focus state for all stories but I don't think we have any space issues so far; so maybe we should just keep them all until we can't 😅 |
Was wondering that myself haha, what would be "standard" to just do it on the default for button/iconButton? maybe that makes more sense... happy to fix! |
Yeah that makes sense to me! |
…/revert-segmented-control
…om:primer/react into revert-5114-chore/revert-segmented-control
…/revert-segmented-control
This reverts commit 5736299.
Closes https://github.com/github/primer/issues/3381
This is a revert of #5114. Corrects the detected bug by adding an offset to the GlobalFocusStyles.
Adds focus styles for
SegmentedControlButton
andSegmentedControlIconButton
components 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 #5029 (with bug):
Now:
Changelog
Changed
getGlobalFocusStyles()
inSegmentedControlIconButtonStyled
andSegmentedControlButtonStyled
definitions.Rollout strategy
Testing & Reviewing
SegmentedControl
stories in preview deployment in safari, compare focus states to prod, ensure previous bug is no longer visibleMerge checklist