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
- Open a TypeScript file with a class that has several references to a constructor parameter.
- Rename the parameter so the other references go stale, so NES offers a next edit suggestion.
- 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:
- Leading comma / no content. The message never states that a next edit suggestion is available, or where it is. "Inspect this" has no antecedent.
- 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.
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.
3ddd267c500)Steps to Reproduce
Actual
The
role="alert"region contains exactly:Two problems:
accessibility.verbosity.inlineCompletionsisfalse,hintisundefined, so the call becomesalert(''), which setstextContent = ''and announces nothing. The only remaining cue is the audio signal.Cause
src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.tsEmpty
contentis passed for the inline-edit (NES) case, and_provideScreenReaderUpdatethen doesalert(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.