-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(material/select): make VoiceOver read options for selects in dialogs #20695
Conversation
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.
LGTM, but the lint check is failing.
After having refreshed myself on the various combobox patterns, you're right that this does stray from ARIA 1.2 (which is what I'm guessing you're following here). I'm concerned that adding |
I didn't realize the fix was already done so I took a stab at it and fwiw did confirm it fixes the issue. Here's my snippet (slightly different flavor than your fix but very similar):
+1 to Zack's point about the risk of appearing like a 1.0 combobox. In my separate discussions with Deque to get axe updated to permit the 1.2 pattern (dequelabs/axe-core#2505), one potential that was raised was to warn when people set |
8257e1c
to
2317968
Compare
@stevenyxu I moved |
Forgot to link the demo: https://material2-dev.firebaseapp.com/select |
2317968
to
82cf66f
Compare
Fixes angular#20694 @zelliot noted that this issue was caused by `aria-modal` preventing VoiceOver from accessing the select's listbox overlay. He suggested using `aria-owns` to re-parent the overlay element to the select trigger. I tried this and it works great.
82cf66f
to
fe4c893
Compare
If I understand @stevenyxu correctly, he recommended placing the Regardless, I think this PR is still an improvement over the status quo, which renders popup listboxes wholly inaccessible within modal dialogs, so I wouldn't block on this concern. |
Yeah, the only way I see the sibling approach working is if we manually insert a DOM element, which obviously isn't ideal. I figure it's better to hold off on that and see if anyone actually reports a problem. |
This PR does not resolve the main issue. Select component is not being read by screen readers. The solution would be to follow the suggestion by @zelliott. |
@rameshworsht feel free to file a new issue if you have steps to reproduce. I confirmed that this fix worked for VoiceOver, NVDA, and ChromeVox. |
@jelbourn I used the like that you provided for the demo: https://material2-dev.firebaseapp.com/select and test it. Here is the GIF of the test. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #20694
@zelliott noted that this issue was caused by
aria-modal
preventingVoiceOver from accessing the select's listbox overlay. He suggested
using
aria-owns
to re-parent the overlay element to the selecttrigger. I tried this and it works great.