From 078a686c8254dd37ff652ea87df7e0ed53e95615 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Wed, 30 Aug 2023 20:47:31 +0200 Subject: [PATCH] Fix screen reader for comment editor (#191828) * Try forwarding the accessibility support setting to the comment editor * Add isAccessible to comment view Fixes #146994 --- .../contrib/comments/browser/commentThreadZoneWidget.ts | 2 +- .../workbench/contrib/comments/browser/simpleCommentEditor.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts index 1f00b285fa2..74590df5c4c 100644 --- a/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts @@ -129,7 +129,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget @IContextKeyService contextKeyService: IContextKeyService, @IConfigurationService private readonly configurationService: IConfigurationService ) { - super(editor, { keepEditorSelection: true }); + super(editor, { keepEditorSelection: true, isAccessible: true }); this._contextKeyService = contextKeyService.createScoped(this.domNode); this._scopedInstantiationService = instantiationService.createChild(new ServiceCollection( diff --git a/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.ts b/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.ts index c8ec74a476f..f087642f26b 100644 --- a/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.ts +++ b/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.ts @@ -104,7 +104,8 @@ export class SimpleCommentEditor extends CodeEditorWidget { enabled: false }, autoClosingBrackets: configurationService.getValue('editor.autoClosingBrackets'), - quickSuggestions: false + quickSuggestions: false, + accessibilitySupport: configurationService.getValue<'auto' | 'off' | 'on'>('editor.accessibilitySupport'), }; } }