Skip to content

keep Ace's enableKeyboardAccessibility flag in sync with IDE's screen reader mode - #13786

Merged
gtritchie merged 2 commits into
mainfrom
feature/ace-keyboard-a11y-mode
Oct 12, 2023
Merged

gtritchie merged 2 commits into
mainfrom
feature/ace-keyboard-a11y-mode

Conversation

@gtritchie

@gtritchie gtritchie commented Oct 12, 2023 •

Copy link
Copy Markdown
Member

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

  • If this PR adds a new feature, or fixes a bug in a previously released version, it includes an entry in NEWS.md
  • If this PR adds or changes UI, the updated UI meets accessibility standards
  • A reviewer is assigned to this PR (if unsure who to assign, check Area Owners list)
  • This PR passes all local unit tests

@gtritchie
gtritchie merged commit afbabb5 into main Oct 12, 2023
@gtritchie
gtritchie deleted the feature/ace-keyboard-a11y-mode branch October 12, 2023 21:45
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