Skip to content

NES: screen reader announcement for next edit suggestions is empty (or a bare ", Inspect this in the accessible view") #327615

Description

@ulugbekna

Found while doing a hands-on accessibility pass over Next Edit Suggestions.

Does this issue occur when all extensions are disabled?: No — NES requires the GitHub Copilot extension to provide the inline edit.

  • VS Code Version: 1.132.0 (built from source, 3ddd267c500)
  • Copilot Chat Extension Version: 0.60.0
  • OS Version: macOS 26.5.2

Steps to Reproduce

  1. Open a TypeScript file with a class that has several references to a constructor parameter.
  2. Rename the parameter so the other references go stale, so NES offers a next edit suggestion.
  3. Inspect the ARIA live region while the suggestion is showing:
    document.querySelector('.monaco-aria-container').outerHTML

Actual

The role="alert" region contains exactly:

, Inspect this in the accessible view (Option+F2)

Two problems:

  1. Leading comma / no content. The message never states that a next edit suggestion is available, or where it is. "Inspect this" has no antecedent.
  2. With verbosity off there is no announcement at all. When accessibility.verbosity.inlineCompletions is false, hint is undefined, so the call becomes alert(''), which sets textContent = '' and announces nothing. The only remaining cue is the audio signal.

Cause

src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts

if (this.editor.getOption(EditorOption.screenReaderAnnounceInlineSuggestion)) {
    if (state.kind === 'ghostText') {
        this._provideScreenReaderUpdate(state.primaryGhostText.renderForScreenReader(lineText));
    } else {
        this._provideScreenReaderUpdate(''); // Only announce Alt+F2
    }
}

Empty content is passed for the inline-edit (NES) case, and _provideScreenReaderUpdate then does alert(hint ? content + ', ' + hint : content).

Ghost-text completions get a real spoken description; NES gets nothing.

Expected

NES should announce something meaningful, e.g. "Next edit suggestion available on line 9, press Tab to jump" — and the accessible-view hint should be appended to that rather than being the entire message.

Related: pressing Tab to jump moves the cursor to a different line, which is a significant context change that also isn't announced.

Metadata

Metadata

Labels

accessibilityKeyboard, mouse, ARIA, vision, screen readers (non-specific) issuesbugIssue identified by VS Code Team member as probable bugnew releaseIssues found in a recent release of VS Code

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions