-
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: switch aria-selected to aria-current for webkit #5416
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5416 +/- ##
==========================================
- Coverage 87.59% 87.59% -0.01%
==========================================
Files 583 584 +1
Lines 46389 46409 +20
Branches 7018 7021 +3
==========================================
+ Hits 40636 40651 +15
- Misses 5753 5758 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/autocomplete/popup.js
Outdated
@@ -153,7 +153,7 @@ class AcePopup { | |||
selected.setAttribute("aria-setsize", popup.data.length); | |||
selected.setAttribute("aria-posinset", row + 1); | |||
selected.setAttribute("aria-describedby", "doc-tooltip"); | |||
selected.setAttribute("aria-selected", "true"); | |||
selected.setAttribute(userAgent.isSafari ? "aria-current" : "aria-selected", "true"); |
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.
We might wanna do the isSafari
check more above to group Safari related changes in one place.
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.
@sokomari refactored the PR a bit to make it clearer, do you think this is an improvement?
Issue #, if available: NA
Description of changes: follow-up to #5403, we set the role to
menuitem
for items in the completer popup on webkit browsers butaria-selected
is not allowed formenuitem
roles triggering customers who run automated a11y tests. This changes it to aria-current which is allowed for this role.Screen.Recording.2023-12-06.at.16.53.21.mov
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.