microsoft / microsoft/vscode

NES: gutter indicator is focusable but has no role, no accessible name, and cannot be operated by keyboard

Open
#327,616 0 comments 0 reactions 1 assignee Claimed by @hediet View on GitHub
accessibility bug
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

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. Trigger a next edit suggestion so the gutter indicator (the pill showing the target line number) appears.
2. Move focus to the gutter indicator.
3. Press Enter or Space.

## Actual

The gutter indicator is in the tab order but is not operable or identifiable:

- **No accessible name or role.** `role` is `null`, `aria-label` is `null`. Its accessible name is just its text content — the line number, e.g. `"5"`. A screen reader announces an unlabeled element called "5".
- **Enter and Space do nothing.** Focus stays on the icon, no menu opens, and the jump/accept that a mouse click performs does not happen. Verified live, with a control test in the same session confirming key delivery was working.
- **The menu is mouse-only.** It opens from `onmouseenter`, so **Go To / Accept**, **Reject**, **Show Collapsed**, **Snooze**, **Settings** and **Feedback** are unreachable without a pointing device.

Net effect: a keyboard user who tabs into the indicator hits a dead end, and a screen reader user gets an unlabeled stop in the tab order.

## Cause

`src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts`

```ts
n.div({
class: 'icon',
ref: this._iconRef,

tabIndex: 0,
onclick: () => { /* jump or accept */ },

onmouseenter: () => {
// TODO show hover when hovering ghost text etc.
this._showHover();
},
...
```

`tabIndex: 0` makes it focusable, but there is no `onkeydown`, no `role`, and no `aria-label`. A `

` with `tabindex=0` does not get a synthesized click on Enter the way a `` does.

## Expected

- Give the indicator `role="button"` and a localized `aria-label` describing what it is and where it points (e.g. "Next edit suggestion on line 5").
- Handle Enter/Space to perform the same jump/accept as `onclick`.
- Provide a keyboard affordance for opening the menu (e.g. a context-menu key / dedicated command), so Reject, Snooze, Show Collapsed and Settings aren't mouse-only.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.