Repository navigation
keep Ace's enableKeyboardAccessibility flag in sync with IDE's screen reader mode - #13786
Merged
Merged
Conversation
4 tasks done
jgutman
approved these changes
Oct 12, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Addresses #13593 and #7337
Approach
Ace has a flag that needs to be turned on for screen reader users. This change keeps that flag in sync with the IDE's "screen reader" mode flag.
Turning this on improves screen reader support for the editor, including better announcements of content as you navigate around a document.
It also enables a feature where hitting the ESC key moves focus outside the editor surface, allowing a keyboard-only user to break out of the inherent keyboard trap and use Tab to move elsewhere.
It also enables the ability to interact with controls in the editor gutter region such as expanding/collapsing regions of code, but that isn't quite working (something specific to the IDE, it works on the Ace kitchen sink). I will open a separate issue on that (#13787).
Finally, Ace now has screen reader support for its autocomplete suggestion popups, but currently that only works for the ones supplied BY Ace (e.g. for JavaScript). The custom popups implemented by the IDE itself (e.g. for R code) still don't support the screenreader. That is tracked by #6167.
Automated Tests
None currently.
QA Notes
To test, turn on screen reader then start RStudio. Be sure RStudio's screen reader mode is on RStudio (Help / Accessibility / Screen Reader Support, then open something in the editor and put focus on it (Ctrl+1).
Now hit ESC and focus should change to the whole editor, and you'll hear an announcement "Editor Content: Press Enter to start editing, press Escape to exit editor". Hitting Tab at that point should move focus away from the editor.
The improvements in source code navigation are best observed on Windows using JAWS or NVDA. The experience on the Mac using Chrome or RStudio Desktop and VoiceOver still isn't ideal, but slightly less terrible than before. Still terrible with Safari and VoiceOver.
Documentation
N/A
Checklist
NEWS.md