Skip to content

C/C++ code completion popup not announced by screen readers #19532

Closed

Description

@gtritchie

Describe the problem in detail

Code completion in C and C++ files doesn't use the popup that #6167 fixed. AceEditor registers CppCompletionManager for C/C++ mode, which shows completions in CppCompletionPopupMenu (a ScrollableToolbarPopupMenu), not CompletionPopupPanel / CompletionList.

That menu is created with setReceivesFocus(ReceivesFocus.NO), so keyboard focus stays in the editor's Ace text input while the user arrows through the list, and nothing sets the input's aria-activedescendant to the selected item. Screen readers are therefore unlikely to announce the selection. This is from reading the code; it hasn't been confirmed with a screen reader yet.

The item icons are also added with SafeHtmlUtil.appendImage, which emits no alt text.

Steps to reproduce

  1. Use a C++ toolchain with libclang available, so C++ completion works.
  2. With a screen reader running and screen reader support enabled, open a .cpp file and type a partial identifier, then press Tab.
  3. Use the arrow keys to move through the completion list.

Describe the behavior you expected

The selected completion is announced as the selection moves, as it now is for R, R Markdown, Python, and SQL files (#6167). The fix for #6167 sets the Ace input's aria-activedescendant through InputEditorDisplay.setAriaActiveDescendant, which this popup could reuse.

Metadata

Metadata

Assignees

Labels

accessibilityautocompletionbug

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions