NES: announce a meaningful screen reader message for next edit suggestions - #327666
Open
meganrogge with Copilot wants to merge 3 commits into
Open
NES: announce a meaningful screen reader message for next edit suggestions#327666meganrogge with Copilot wants to merge 3 commits into
meganrogge with Copilot wants to merge 3 commits into
Conversation
…readers Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix empty screen reader announcement for next edit suggestions
NES: announce a meaningful screen reader message for next edit suggestions
Jul 27, 2026
meganrogge
marked this pull request as ready for review
July 27, 2026 17:39
meganrogge
enabled auto-merge (squash)
July 27, 2026 17:39
Contributor
There was a problem hiding this comment.
Pull request overview
Adds meaningful screen-reader announcements for Next Edit Suggestions.
Changes:
- Announces the target line and whether Tab jumps to or accepts the suggestion.
- Preserves accessible-view verbosity hints.
Show a summary per file
| File | Description |
|---|---|
inlineCompletionsController.ts |
Adds localized NES announcements. |
Review details
Comments suppressed due to low confidence (1)
src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts:353
- This creates a second announcement for NES. Immediately above,
playSignal(AccessibilitySignal.nextEditSuggestion)emits the signal'sannouncementMessagethrough a polite live region, and that announcement defaults toautofor screen-reader users; this call then emits the detailed text through an assertive alert. Users can hear both “Next Edit Suggestion” and this new message. Suppress the signal's announcement modality when the detailed editor announcement is enabled, while retaining its sound.
this._provideScreenReaderUpdate(content);
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Medium
Comment on lines
+349
to
+352
| const cursorAtInlineEdit = state.cursorAtInlineEdit.get(); | ||
| const content = cursorAtInlineEdit | ||
| ? localize('nextEditSuggestionAccept', "Next edit suggestion available on line {0}, press Tab to accept", lineNumber) | ||
| : localize('nextEditSuggestionJump', "Next edit suggestion available on line {0}, press Tab to jump", lineNumber); |
Contributor
Author
There was a problem hiding this comment.
Fixed in the latest commit. The announcement now checks model.tabShouldAcceptInlineEdit and model.tabShouldJumpToInlineEdit to determine what action is available, and looks up the resolved keybinding via IKeybindingService.lookupKeybinding(...).getAriaLabel() for each respective command (inlineSuggestCommitId / jumpToNextInlineEditId). When neither command is active, or when the keybinding can't be resolved, the key hint is omitted from the announcement.
…s and actionable commands Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
meganrogge
approved these changes
Jul 27, 2026
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.
Description
When a Next Edit Suggestion (NES / inline-edit) appeared, the screen reader announcement was empty.
InlineCompletionsControllerpassed''to_provideScreenReaderUpdatefor the inline-edit case, which resulted in:", Inspect this in the accessible view (Option+F2)"(leading comma, "Inspect this" with no antecedent) whenaccessibility.verbosity.inlineCompletionswas on.alert('')— no announcement at all — when verbosity was off, leaving only the audio signal.Ghost-text completions were unaffected; only NES lacked a spoken description.
Changes
inlineCompletionsController.ts, replace the empty announcement for theinlineEditstate with a self-describing message that includes the target line number and the relevant action:state.cursorAtInlineEdit) → "Next edit suggestion available on line {N}, press Tab to accept"Notes
semanticIdis unchanged on jump and re-triggering would require broader changes to the announcement logic.