-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Button
] Prevent the loading
spinner from overlapping a monochrome
outline
Button
’s text
#5145
[Button
] Prevent the loading
spinner from overlapping a monochrome
outline
Button
’s text
#5145
Conversation
loading
spinner from overloading a monochrome outline Button
’s textloading
spinner from overlapping a monochrome
outline
Button
’s text
4482c4e
to
a26b3b7
Compare
size-limit report
|
a26b3b7
to
168de2c
Compare
src/components/Button/Button.scss
Outdated
@@ -392,6 +392,11 @@ $stacking-order: ( | |||
opacity: 0.4; | |||
} | |||
|
|||
// Prevents the loading spinner from overlapping the button’s text, while retaining its width. | |||
&.loading .Text { | |||
opacity: 0; |
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.
-
Voiceover still properly announces it as loading once the state changes:
-
If I refocus the button somehow VoiceOver still picks up the button’s text:
Some screen-readers might ignore it though, but I think that’s okay because it will still say the button is busy/dimmed. Not sure why the “Loading” from theSpinner
doesn’t also get announced in this case though, I need to manually get into the button to target it, which seems wrong. 😅 Either way it’s rare that people would focus back to a button that’s loading.
loading
spinner from overlapping a monochrome
outline
Button
’s textButton
] Prevent the loading
spinner from overlapping a monochrome
outline
Button
’s text
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.
Thanks for contributing @Tom-Bonnike!!! Couple of suggestions and this is ready to ship 🚀
…e` `Button`’s text
168de2c
to
95b7592
Compare
WHY are these changes introduced?
Fixes #5078.
WHAT is this pull request doing?
Before
Before.mov
After
After.mov
How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx
:🎩 checklist
README.md
with documentation changes