-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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: set completion popup role to 'menu' for safari #5403
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5403 +/- ##
=======================================
Coverage 87.54% 87.54%
=======================================
Files 583 583
Lines 46216 46222 +6
Branches 6998 7001 +3
=======================================
+ Hits 40459 40465 +6
Misses 5757 5757
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The experience in other browsers is not affected by setting the |
@InspiredGuy not as far as I can tell, setting |
follow-up to #5403, we set the role to menuitem for items in the completer popup on webkit browsers but aria-selected is not allowed for menuitem roles triggering customers who run automated a11y tests. This changes it to aria-current which is allowed for this role.
Issue #, if available: #5377
Description of changes: On Safari,
aria-activedescendant
is not supported for thelistbox
role but is supported for themenu
role. This results in an unusable autocomplete for VoiceOver/Safari users. This changes the role tomenu
for Safari to give some (but not perfect) support for this browser/screenreader combo:Screen.Recording.2023-11-28.at.11.17.37.mov
Sets
aria-roledescription
to keep the behaviour somewhat consistent between the two flows. Setsaria-selected
for the selected item, without it Safari/VoiceOver doesn't read the item.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.