Skip to content

Autocomplete accessibility features - #5008

Merged
andrewnester merged 2 commits into
masterfrom
unknown repository
Dec 9, 2022
Merged

andrewnester merged 2 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Dec 9, 2022 •

Copy link
Copy Markdown

Issue #, if available:

Description of changes:
Adds necessary roles and aria-labels for the autocomplete popup.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ghost ghost changed the title Accessible autocomplete Autocomplete accesibility features Dec 9, 2022
@ghost ghost changed the title Autocomplete accesibility features Autocomplete accessibility features Dec 9, 2022
Comment thread src/autocomplete/popup.js Resolved
Comment thread src/layer/text.js Resolved
Comment thread src/keyboard/textinput.js Resolved
@ghost
ghost marked this pull request as ready for review December 9, 2022 10:51
@codecov

codecov Bot commented Dec 9, 2022

Copy link
Copy Markdown

Codecov Report

Base: 86.11% // Head: 86.11% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (9dac4d5) compared to base (5016e90).
Patch coverage: 93.93% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5008   +/-   ##
=======================================
  Coverage   86.11%   86.11%           
=======================================
  Files         546      546           
  Lines       41600    41627   +27     
  Branches     6553     6555    +2     
=======================================
+ Hits        35822    35847   +25     
- Misses       5778     5780    +2     
Flag Coverage Δ
unittests 86.11% <93.93%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/autocomplete/popup.js 78.47% <86.66%> (+0.38%) ⬆️
src/autocomplete.js 65.25% <100.00%> (+0.18%) ⬆️
src/autocomplete_test.js 97.50% <100.00%> (ø)
src/keyboard/textinput.js 75.94% <100.00%> (+0.53%) ⬆️
src/layer/text.js 91.52% <100.00%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@andrewnester
andrewnester merged commit 3b7bb5e into ajaxorg:master Dec 9, 2022

@skazantsev skazantsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current implementation we set an id of the selected element in the autocomplete and remove the id once the element is not selected/focussed. Why we need to do all of this? Can't we generate id once e.g. ace_line_{index} and set aria-activedescendant when an item is selected? Ofc, we need to make sure that ids do not clash.

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