-
Notifications
You must be signed in to change notification settings - Fork 598
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(Button): Add min-width to small size button #5141
Conversation
🦋 Changeset detectedLatest commit: 0074573 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 |
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, 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 📦
|
…on-the-button-component-which-can-lead-to-target-size-failure' of github.com:primer/react into francinelucca/3422-prcbutton-no-minimum-width-enforced-on-the-button-component-which-can-lead-to-target-size-failure
No longer needed, see https://github.com/github/primer/issues/3422#issuecomment-2420677912 |
Closes https://github.com/github/primer/issues/3422
Ports over the fix made in view components for inaccessible target size.
When a button size is small and it's content is too small (for example, a single character), the button may fall below target size standards for accessibility due to not having a minimum width set. This PR enforces a minimum width of 28px on small buttons.
Before:

After:

Changelog
Changed
packages/react/src/Button/ButtonBase.module.css
andpackages/react/src/Button/styles.ts
Rollout strategy
Testing & Reviewing
Merge checklist