Skip to content
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

Use getGlobalFocusStyles in ToggleSwitch #4451

Merged
merged 4 commits into from
Apr 8, 2024

Conversation

TylerJDev
Copy link
Contributor

@TylerJDev TylerJDev commented Mar 29, 2024

Related: https://github.com/github/accessibility-audits/issues/7420, https://github.com/github/accessibility-audits/issues/6706

Utilizes getGlobalFocusStyles in ToggleSwitch to override any global outline-offset styles that would apply to it.

Changelog

Changed

Applies outline-offset via getGlobalFocusStyles.

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Mar 29, 2024

🦋 Changeset detected

Latest commit: 6f5bd70

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

Copy link
Contributor

github-actions bot commented Mar 29, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 87.76 KB (+0.02% 🔺)
packages/react/dist/browser.umd.js 88.08 KB (+0.07% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-4451 March 29, 2024 17:07 Inactive
@TylerJDev TylerJDev marked this pull request as ready for review March 29, 2024 17:18
@TylerJDev TylerJDev requested a review from a team as a code owner March 29, 2024 17:18
Copy link
Member

@broccolinisoup broccolinisoup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 🎉

'@primer/react': patch
---

Utilize `getGlobalFocusStyle` to prevent `outline-offset` from being overridden by global styles
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick and totally optional:

- global styles
+ default browser styles

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me!

@TylerJDev TylerJDev added this pull request to the merge queue Apr 8, 2024
Merged via the queue into main with commit 2f49393 Apr 8, 2024
30 checks passed
@TylerJDev TylerJDev deleted the tylerjdev/toggle-switch-focus-fix branch April 8, 2024 16:12
@primer primer bot mentioned this pull request Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants