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(a11y): update aria-label of textinput on cursor move #5665

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

babalaui
Copy link
Contributor

@babalaui babalaui commented Nov 4, 2024

Issue #, if available:

Description of changes: The aria-label on ace text-input ("Cursor at row X"), was being set only on focus, which means that if the cursor moved within the editor, the label would still be set for the initial row. This lead to the screen reader announcing the wrong row number when accepting a suggestion.

With this change, the aria-label will be updated on every cursor change.

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

Pull Request Checklist:

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.01%. Comparing base (25d3fee) to head (dbdfd97).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5665   +/-   ##
=======================================
  Coverage   87.01%   87.01%           
=======================================
  Files         598      598           
  Lines       43666    43681   +15     
  Branches     7205     7205           
=======================================
+ Hits        37995    38010   +15     
  Misses       5671     5671           
Flag Coverage Δ
unittests 87.01% <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.

@akoreman
Copy link
Contributor

akoreman commented Nov 4, 2024

Change looks good to me, did you verify that the screen reader doesn't read the updated aria label on every cursor change?

@babalaui
Copy link
Contributor Author

babalaui commented Nov 4, 2024

@akoreman yep, verified on mac os + voiceover, screen reader still only reads it when focusing editor.

@babalaui babalaui merged commit 6ff93a8 into master Nov 4, 2024
3 checks passed
@babalaui babalaui deleted the fix-textinput-alabel branch November 4, 2024 10:35
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