microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.87k stars 29.15k forks source link

[Accessibility] add a command to focus comment on current line #226090

Closed jooyoungseo closed 1 month ago

jooyoungseo commented 2 months ago

Type: Feature Request

CC @meganrogge

Repros

  1. Open any file containing comment thread

  2. In editor, move your cursor to any line having comment

  3. Once your cursor is on the line, press ctrl+K ctrl+I to see if the comment tolltip opens

Current Issue

Screen reader users cannot open comment tooltip on the current line via ctrl+K ctrl+I

Expected Behavior

ctrl+K ctrl+I needs to work for the comment tooltip just like other tooltips.

VS Code version: Code - Insiders 1.93.0-insider (e2b54301a5745870f6b95d81c91fb3e9557d4f08, 2024-08-20T08:04:15.567Z) OS version: Windows_NT x64 10.0.22631 Modes:

meganrogge commented 2 months ago

@jooyoungseo, the comment widget is not a tooltip. We cannot reuse this keybinding to focus the comment widget because it's possible that line will have hover info.

@alexr00, pls lmk if you disagree.

I do wonder if we should have a focus closest comment widget command/keybinding.

jooyoungseo commented 2 months ago

@meganrogge Aw, I see. Please then consider adding a keybinding to focus the closest comment widget. Currently, alt+F9 and shift+alt+F9 go to the next and previous comment widget, but there is no action available to focus the comment on the current line.

alexr00 commented 2 months ago

👍It does make sense to have an "Expand and focus comment at current line" command.

alexr00 commented 1 month ago

The new command is "Focus Comment on Current Line" with no default keybinding.

alexr00 commented 1 month ago

To verify:

meganrogge commented 1 month ago

This should probably be added to the comments and/or the editor accessibility help dialog for discoverability.