-
Notifications
You must be signed in to change notification settings - Fork 536
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
Un-revert "Add loading
prop for Button
and IconButton
(#3582)"
#4485
Conversation
🦋 Changeset detectedLatest commit: 85c68a6 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 |
loading
prop for Button
and IconButton
(#3582)""loading
prop for Button
and IconButton
(#3582)"
size-limit report 📦
|
Hi! There is another bug when aria-label is present, tried to address that in this PR (not merged): #4459 Should I copy those changes over here as well? |
@siddharthkp - yes, please copy those changes over as well |
Sorry, while copying over my changes, I ran into a couple questions
Looking at this comment, is this still true? It looks like we set |
@siddharthkp I'm not sure I understand your question because we set all three depending on the situation. We set We set
We set
|
Sorry, bad choice of words from me. I'll try again Looking at this block of code: https://github.com/primer/react/pull/4485/files#diff-515525e4a59d9a55e13c6c60155ec6782c78a026aae4c540c324cd8e11c83a48R102-R105: // aria-labelledby is needed because the accessible name becomes unset when the button is in a loading state.
// We only set it when the button is in a loading state because it will supercede the aria-label when the screen
// reader announces the button name.
aria-labelledby={loading ? `${uuid}-label` : ariaLabelledBy} and wondering why/when accessible name becomes unset when the button is in a loading state? I removed it that line and saw no changes which really confused me. I'm probably missing something very obvious here, thanks for your patience with me! |
Thanks @siddharthkp
I had the same experience in the browser, but it caused the following test to fail:
|
VRTs need to be updated now that we fixed the bug where whitespace characters were not being rendered between two elements. For example: the single-select ActionMenu button label: https://primer.style/react/storybook/?path=/story/components-actionmenu-features--single-select |
I kicked off an update to the integration test PR: https://github.com/github/github/actions/runs/10066055529 |
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/334172 |
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 good! ✨
Brings back #3582
Adds a
loading
state to bothButton
andIconButton
. The markup follows the recommended path forward from accessibility design, and mirrors the implementation from theExport CSV
button as part of GH org security coverage pages.Implementation details
aria-disabled
instead ofdisabled
to maintain focus managementNew props:
loading
: booleanloadingAnnouncement
: default toLoading
or provide a custom message to be announced on ATsCloses https://github.com/github/primer/issues/2680
Screenshots
CleanShot.2023-10-11.at.14.55.13.mp4
CleanShot.2023-10-11.at.14.55.42.mp4
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.