-
Notifications
You must be signed in to change notification settings - Fork 639
SelectPanel anchors should have aria-haspopup="dialog" #3636
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
Conversation
- Currently select panel have aria-hospopup="true". - Added aria-hoshpopup="listbox" to fix the issue.
🦋 Changeset detectedLatest commit: 505741e 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 |
Thanks so much for taking the time to open this PR! Just wanted to share this as a heads up, we're sync'ing up with the accessibility team here at GitHub to double-check the intended behavior for the upstream issue. We should be meeting on Friday this week and we'll figure out next steps from there. Hope this makes sense! Let me know if you have any questions. |
Hey @joshblack , Thank you so much for taking your time and taking a look at the PR. This gives me motivation to contribute more to Thanks! |
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 so much for your patience! Requesting a small change to dialog
based on the feedback in the issue. Let me know if you have any questions!
<Button | ||
trailingAction={TriangleDownIcon} | ||
aria-labelledby={` ${ariaLabelledBy}`} | ||
{...anchorProps} | ||
aria-haspopup="listbox" | ||
> |
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.
<Button | |
trailingAction={TriangleDownIcon} | |
aria-labelledby={` ${ariaLabelledBy}`} | |
{...anchorProps} | |
aria-haspopup="listbox" | |
> | |
<Button | |
trailingAction={TriangleDownIcon} | |
aria-labelledby={` ${ariaLabelledBy}`} | |
aria-haspopup="dialog" | |
{...anchorProps} | |
> |
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.
Hey @joshblack,
The order which you suggested will not work
aria-haspopup="dialog"
{...anchorProps}
because first it will take the value of aria-haspopup to dialog
then it will overwrite the value with true
from anchorProps. So to fix that we need first pass anchorProps
and then dialog
.
{...anchorProps}
aria-haspopup="dialog"
Please let me know if you have any questions.
I have updated the screenshots in the PR description with the current changes.
Also I found something while testing the changes locally that the same issue still exists in SelectPanel.features.stories.tsx. Please let me know if should we fix this issue in this PR as well or open a completely new issue.
Thanks!
hey @joshblack ✋ , |
Hey @electron97! So sorry about the delay, re-checking this and I think the changes look great 👍 For SelectPanel, there has been new work on the V2 version but I think this change totally makes sense as-is. Thanks so much for making this PR! |
Summary
aria-haspopup="true"
which is incorrect.aria-haspopup="true"
by default in AnchoredOverlay.tsx.aria-haspopup="listbox"
inSelectPanel.stories.tsx
renderAnchor to fix the issue.Closes #3629
Screenshots
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.