-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Add command to announce editor line and column number #282152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new command editor.action.announceCursorPosition that announces the current cursor position (line and column) to screen reader users. This addresses an accessibility need where users want to quickly hear their current cursor location without navigating to the status bar.
Key Changes:
- New
AnnounceCursorPositionaction that uses the ARIAalert()function to announce position - Integration with accessibility help documentation to inform users about the new command
- Localized strings for the command title, description, and announcement message
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts | Implements the new AnnounceCursorPosition command that retrieves the cursor position and announces it via screen reader |
| src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.ts | Adds reference to the new command in the accessibility help content |
| src/vs/editor/common/standaloneStrings.ts | Adds localized string for the accessibility help entry with keybinding placeholder |
src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts
Show resolved
Hide resolved
meganrogge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't test (we should) but LGTM! We should test using status and alert and see how each behaves.
|
Let's go with |
|
Forgot to add keybinding🫢 |
meganrogge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this 😄
| id: 'editor.action.announceCursorPosition', | ||
| title: nls.localize2('announceCursorPosition', "Announce Cursor Position"), | ||
| f1: true, | ||
| // TODO: Get suggestion on Keybinding!. Something with ctrl+g since people are used to it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anthonykim1 should we try the keybinding they suggested here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap! @meganrogge is
[Add keybinding ctrlCmd+shift+g]0417961 good place to put it?
Resolves: #278855