Repository navigation
Announce completion popup messages, types, and help to screen readers - #19805
Merged
Merged
Conversation
Screen readers now hear the messages these popups show in place of, or below, their list: "(No matches)", server errors, "(No matching commands)" in the console history popup, and that a truncated list doesn't show all items. A message refreshed as the user types is announced only when it changes. The announcements can be turned off as "Completion messages" in the accessibility options. Addresses #19533.
Each completion's type was shown only by its icon, which screen readers
skip. R and C/C++ completions now follow their name with the type as
visually hidden text, so an option reads e.g. "cat, function, {base}".
Labels follow the completion's type rather than its icon, since several
types share an icon; types whose kind isn't known get no label.
Addresses #19533.
The help shown beside a completion list wasn't associated with the selected item, so screen readers didn't read it. The selected item's aria-describedby now points at the help once it's shown for that item, in the R and C/C++ popups, and moving the selection unlinks it. Help that arrives after the selection (most R help, which loads from the server) is read with the item's description, e.g. on re-reading it, rather than as it arrives. The help's data frame preview frame was titled "title"; it's now "Data preview", since its title is part of that description. Addresses #19533.
Help that finished loading after the selection moved on was still shown, beside and now linked to the newly selected item. It's now dropped unless its item is still selected. A list refreshed as the user types also linked the help it was still showing, for the previous selection, to its new selection; only help displayed for the selection links now. Addresses #19533.
Help was cached, and checked against the selection, by name and type
only, so filter {dplyr} and filter {stats} shared help: one's help was
shown beside, and linked to, the other. Help is now keyed by its type,
name, source, and help handler. Responses for items the user has moved
past are cached rather than dropped, and a failed request for such an
item no longer clears the selected item's help or shows an error.
Addresses #19533.
Every completion help popup got the same element id, because ids are made unique only against elements already in the page, and an editor creates a completion popup per language before any is shown. A list item's aria-describedby could then name another popup's help. Items now point at an element inside their own popup's help with a unique id. Addresses #19533.
Python and SQL completions reuse R's completion types with other meanings, so a SQL table read as a "data frame", its fields as "dataset", and a schema or Python module as "environment". Their types are no longer named. SQL schema, table, and field completions now report their language as SQL; they defaulted to R. Addresses #19533.
Announcing an empty message cancels a pending announcement and blanks the live region. Only the R completion popup skipped empty messages; the check now lives in CompletionListAria.announce, used by every popup. CompletionPopupPanel.showProgress had no callers. Addresses #19533.
Custom help handlers resolve topics per language, so R and Python items with the same type, name, source, and handler could share cached help. Addresses #19533.
Member
Author
|
Review findings deliberately not acted on, for later reviews:
|
gtritchie
commented
Nov 24, 2026
Completions from a package's own provider, which set a help handler, use R's completion types with the package's meanings: completed with $ from R, a Python submodule such as os$path is an ENVIRONMENT and read as "environment". Their types are no longer named. Addresses #19533.
RStudio E2E - all platformsAll tests passed!
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.
Fixes #19533.
Follow-up to #6167 and #6168: screen readers now hear what the R completion popup, the console history popup, and the C/C++ completion popup show besides the selected item.
AriaLiveService. A message refreshed as the user types is announced only when it changes. The announcements can be turned off as "Completion messages" in Accessibility options.$from R through reticulate). To tell SQL completions apart, SQL schema, table, and field completions now report their language as SQL instead of defaulting to R.aria-describedbypoints at that help, and moving the selection unlinks it. Help that arrives after the selection (most R help, which loads from the server) is read with the item's description, e.g. when re-reading it, rather than as it arrives.Linking help exposed some problems in how help reaches the popup, which are fixed here:
filter {dplyr}andfilter {stats}shared help. It's now keyed by type, name, source, help handler, and language.CompletionPopupPanel.showProgress, which had no callers, is removed.No NEWS entry: this builds on #6167 and #6168, which haven't been released.
Testing
CompletionPopupPanelTests(announcements, help linking, per-popup help ids) and a newQualifiedNameTests(type labels, including none for Python, SQL, and package-provider completions), registered inRStudioUnitTestSuite.test-sql-completions.R: SQL table and field completions report their language as SQL (skipped without DBI and RSQLite).