Skip to content

Commit 27fafd6

Browse files
committed
check screen reader optimized
1 parent 5b2ecd2 commit 27fafd6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/vs/workbench/contrib/chat/browser/chatInputPart.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { CONTEXT_CHAT_INPUT_HAS_TEXT, CONTEXT_IN_CHAT_INPUT } from 'vs/workbench
3131
import { IChatReplyFollowup } from 'vs/workbench/contrib/chat/common/chatService';
3232
import { IChatWidgetHistoryService } from 'vs/workbench/contrib/chat/common/chatWidgetHistoryService';
3333
import { AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution';
34+
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
3435

3536
const $ = dom.$;
3637

@@ -80,7 +81,8 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
8081
@IInstantiationService private readonly instantiationService: IInstantiationService,
8182
@IContextKeyService private readonly contextKeyService: IContextKeyService,
8283
@IConfigurationService private readonly configurationService: IConfigurationService,
83-
@IKeybindingService private readonly keybindingService: IKeybindingService
84+
@IKeybindingService private readonly keybindingService: IKeybindingService,
85+
@IAccessibilityService private readonly accessibilityService: IAccessibilityService
8486
) {
8587
super();
8688

@@ -154,9 +156,13 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
154156
if (!domNode) {
155157
return;
156158
}
157-
this._inputEditorElement.removeChild(domNode);
159+
if (this.accessibilityService.isScreenReaderOptimized()) {
160+
this._inputEditorElement.removeChild(domNode);
161+
}
158162
this._inputEditor.setValue('');
159-
this._inputEditorElement.appendChild(domNode);
163+
if (this.accessibilityService.isScreenReaderOptimized()) {
164+
this._inputEditorElement.appendChild(domNode);
165+
}
160166
this._inputEditor.focus();
161167
}
162168

0 commit comments

Comments
 (0)