Skip to content
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

Merged
merged 7 commits into from
Dec 11, 2023

Conversation

akoreman
Copy link
Contributor

@akoreman akoreman commented Dec 7, 2023

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 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.

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.

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aac600d) 87.59% compared to head (f1cc9d2) 87.59%.
Report is 4 commits behind head on master.

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     
Flag Coverage Δ
unittests 87.59% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -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");
Copy link
Contributor

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.

Copy link
Contributor Author

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?

@akoreman akoreman merged commit bf1a4ea into ajaxorg:master Dec 11, 2023
2 of 3 checks passed
@akoreman akoreman deleted the aria_current branch December 11, 2023 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants