-
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
Allow Button
to break-word for extra long labels (edge cases)
#4062
Conversation
|
size-limit report 📦
|
I have a path forward for preserving the top and bottom padding for buttons with wrapping lines of text. We can set the following styles on the "buttonContent" container element:
These styles force |
Talked to Katie about my idea on Slack and got the go-ahead to push up changes. |
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.
Idk if I can approve these changes since I pushed a commit, but I'm trying it anyway.
@langermank - we just need a changeset.
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.
Hi 👋 Thanks for the changes @langermank!
As far as I understand this change is a potential fix for https://github.com/github/accessibility-audits/issues/4690
On deeper investigation, I found that the particular bug is probably a rails issue because it looks like this is the source code for the bug mentioned in the issue. So I don't think this particular PR solves any reported issues.
Other things to consider are
- This could potentially be an issue in PRC too. Esp with a
Button
in a container like aDialog
. We can see it is broken in theDialog
stories which currently uses the deprecatedButton
component. We'd need to refactor it to the latestButton
to confirm this. - If a
Button
is present directly on a page, it's not an issue because even on the highest zoom, the page will comfortably overflow and the user will be able to scroll across to view all of the button text (unlike in a dialog where it simply gets cut off). - A cursory investigation in dotcom shows that buttons can have long and dynamic texts frequently. I wonder how this PR affects them. Do you think we can get some input from product devs to get an insight into this? Do you know whom we can add to this review?
Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days. |
Closes #
Changelog
New
Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist