Repository navigation
Announce completion and history popup selections to screen readers - #19541
Merged
Merged
Conversation
Neither the completion popup (console and source editor) nor the console
history popup exposed any ARIA, so screen readers said nothing, or
re-read the typed text, while the user arrowed through the list.
CompletionList, which renders both popups, now exposes a labeled listbox
of options ("Completions" or "Console history") and keeps the focused
Ace input's aria-activedescendant on the selected option, through Ace's
own setAriaOptions. In Safari it uses menu roles, as Ace's popup does.
The attribute is cleared when the list detaches, is cleared, or is
parked offscreen.
Addresses #6167
Addresses #6168
The icons had no alt text, so a screen reader could read them as an unnamed image inside each completion. The item's text names it. Addresses #6167
GWT's setPopupPositionAndShow attaches a popup with visibility: hidden while positioning it, so CompletionList set aria-activedescendant to the first item while that item was hidden. VoiceOver in Safari skipped it and did not announce it once shown; only later arrow-key moves were read. The list now names its selection in a deferred command after attaching. Addresses #6167 Addresses #6168
Adding setTextInputActiveDescendant split the Javadoc from the method it documents, so it described the new method instead. Addresses #6167
RStudio E2E - all platforms1 test(s) failed
View / download the full reportView report online -- opens in the browser, no download needed. Available for 14 days. Download playwright-report.zip -- extract and open
All platforms - commit |
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.
Screen readers said nothing, or re-read the typed text, while the user arrowed through the code completion popup (console and source editor) or the console history popup. Both popups render through
CompletionList, which had no ARIA.CompletionListexposes a labeled listbox of options ("Completions" / "Console history"). In Safari it uses menu/menuitem roles, as Ace's own completion popup does.aria-activedescendantnames the selected option, set through Ace'ssetAriaOptionsvia a newInputEditorDisplay.setAriaActiveDescendant. It is cleared when the list detaches, is cleared, or is parked offscreen.setPopupPositionAndShowattaches popups withvisibility: hidden, and VoiceOver skipped an item named while hidden and didn't announce it once shown.Not covered here: C/C++ files, which use a separate popup (#19532), and announcing message-only popups, completion types, and the help tooltip (#19533).
Testing
e2e/rstudio/tests/panes/misc/completion_popup_aria.test.ts(console completion, R editor completion, console history): checks roles, label, selected state, thataria-activedescendantfollows arrow keys and clears on Escape, and that it never names a hidden item. Fails before the change, passes after; existingautocompleteandautocomplete_extrassuites pass (server-dev).Fixes #6167.
Fixes #6168.