Change:
Type: <bFeature Request</bCC I appreciate the current implementation of Accessible View (alt+F2) in the Comment Thread. However, I would like to suggest a few improvements to make it more accessible for screen reader users. [Easy navigation]: by separating the comment from the line number, screen reader users can easily navigate the comment text. [Improved discoverability]: providing the corresponding content of the comment can help screen reader users to understand the context of the comment. VS Code version: Code - Insiders 1.93.0-insider (, 2024-08-20T08:04:15.567Z) OS version: Windows_NT x64 10.0. Modes: <!-- generated by issue reporter --
and press alt+f2 was focused but blank a11y view is shown ! the comment content and press alt+f2 11y view shows with just the comment content ! Is the content of the a11y view supposed to match the request in the issue? Am I focusing on the wrong thing?
your focus needs to be on a comment for this to work.
Secondly, you need to have a selection of code associated with the comment to see that in the accessible view.
I notice I can focus on the comment in the Comments view and then press Alt+F2 to show the comment in the accessible view. However, it adds the word "undefined". I'm not sure whether that word comes from the line range or date. !
thanks , i'll make a new issue to track that bug

Discussion:
import { AccessibleViewAction } from '../../accessibility/browser/accessibleViewActions.js'; import type { ITreeElement } from '../../../../base/browser/ui/tree/tree.js'; import { IPathService } from '../../../services/path/common/pathService.js'; <ins> import { isCodeEditor } from '../../../../editor/browser/editorBrowser.js'; </ins> export const CONTEXT_KEY_HAS_COMMENTS = new RawContextKey<boolean>('commentsView.hasComments', false); export const CONTEXT_KEY_SOME_COMMENTS_EXPANDED = new RawContextKey<boolean>('commentsView.someCommentsExpanded', false);

@IHoverService hoverService: IHoverService, @IUriIdentityService private readonly uriIdentityService: IUriIdentityService, @IStorageService storageService: IStorageService, <del> @IPathService private readonly pathService: IPathService </del> <ins> @IPathService private readonly pathService: IPathService, </ins> ) { const stateMemento = new Memento(VIEW_STORAGE_ID, storageService); const viewState = stateMemento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);

} const replyCount = this.getReplyCountAsString(element, forAriaLabel); const replies = this.getRepliesAsString(element, forAriaLabel); <ins> const editor = this.editorService.findEditors(element.resource); const codeEditor = this.editorService.activeEditorPane?.getControl(); let content; if (element.range && editor?.length && isCodeEditor(codeEditor)) { content = codeEditor.getModel()?.getValueInRange(element.range); if (content) { content = 'nCorresponding code: n' + content; } } </ins> if (element.range) { if (element.threadRelevance === CommentThreadApplicability.Outdated) { return accessibleViewHint + nls.localize('resourceWithCommentLabelOutdated', <del> "Outdated from {0} at line {1} column {2} in {3},{4} comment: {5}", </del> <ins> "Outdated from {0} at line {1} column {2} in {3}{4}nComment: {5}{6}", </ins> element.comment.userName, element.range.startLineNumber, element.range.startColumn, basename(element.resource), replyCount, <del> (typeof element.comment.body === 'string') ? element.comment.body : element.comment.body.value </del> <ins> (typeof element.comment.body === 'string') ? element.comment.body : element.comment.body.value, content, </ins> ) + replies; } else { return accessibleViewHint + nls.localize('resourceWithCommentLabel', <del> "{0} at line {1} column {2} in {3},{4} comment: {5}", </del> <ins> "{0} at line {1} column {2} in {3} {4}nComment: {5}{6}", </ins> element.comment.userName, element.range.startLineNumber, element.range.startColumn, basename(element.resource), replyCount, (typeof element.comment.body === 'string') ? element.comment.body : element.comment.body.value, <ins> content, </ins> ) + replies; } } else { if (element.threadRelevance === CommentThreadApplicability.Outdated) { return accessibleViewHint + nls.localize('resourceWithCommentLabelFileOutdated', <del> "Outdated from {0} in {1},{2} comment: {3}", </del> <ins> "Outdated from {0} in {1} {2}nComment: {3}{4}{5}", </ins> element.comment.userName, basename(element.resource), replyCount,

) + replies; } else { return accessibleViewHint + nls.localize('resourceWithCommentLabelFile', <del> "{0} in {1},{2} comment: {3}", </del> <ins> "{0} in {1} {2}nComment: {3}{4}", </ins> element.comment.userName, basename(element.resource), replyCount, <del> (typeof element.comment.body === 'string') ? element.comment.body : element.comment.body.value </del> <ins> (typeof element.comment.body === 'string') ? element.comment.body : element.comment.body.value, content </ins> ) + replies; } }