Skip to content

Commit 6555034

Browse files
authored
fix accessibility issue, setting not respected (#298283)
fixes #296720
1 parent 673360f commit 6555034

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { $, append } from '../../../../../../base/browser/dom.js';
7+
import { IRenderedMarkdown, renderAsPlaintext } from '../../../../../../base/browser/markdownRenderer.js';
78
import { alert } from '../../../../../../base/browser/ui/aria/aria.js';
89
import { Codicon } from '../../../../../../base/common/codicons.js';
910
import { MarkdownString, type IMarkdownString } from '../../../../../../base/common/htmlContent.js';
11+
import { stripIcons } from '../../../../../../base/common/iconLabels.js';
1012
import { Disposable, DisposableStore, MutableDisposable } from '../../../../../../base/common/lifecycle.js';
1113
import { ThemeIcon } from '../../../../../../base/common/themables.js';
1214
import { IMarkdownRenderer } from '../../../../../../platform/markdown/browser/markdownRenderer.js';
13-
import { IRenderedMarkdown } from '../../../../../../base/browser/markdownRenderer.js';
1415
import { IInstantiationService } from '../../../../../../platform/instantiation/common/instantiation.js';
1516
import { localize } from '../../../../../../nls.js';
1617
import { IChatProgressMessage, IChatTask, IChatTaskSerialized, IChatToolInvocation, IChatToolInvocationSerialized } from '../../../common/chatService/chatService.js';
@@ -61,10 +62,9 @@ export class ChatProgressContentPart extends Disposable implements IChatContentP
6162
return;
6263
}
6364

64-
if (this.showSpinner && !this.configurationService.getValue(AccessibilityWorkbenchSettingId.VerboseChatProgressUpdates)) {
65-
// TODO@roblourens is this the right place for this?
65+
if (this.showSpinner && this.configurationService.getValue(AccessibilityWorkbenchSettingId.VerboseChatProgressUpdates)) {
6666
// this step is in progress, communicate it to SR users
67-
alert(progress.content.value);
67+
alert(stripIcons(renderAsPlaintext(progress.content)));
6868
}
6969
const isLoadingIcon = icon && ThemeIcon.isEqual(icon, ThemeIcon.modify(Codicon.loading, 'spin'));
7070
// Even if callers request shimmer, only the active (spinner-visible) progress row should animate.

src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { ChatConfiguration, ThinkingDisplayMode } from '../../../common/constant
1414
import { ChatTreeItem } from '../../chat.js';
1515
import { IInstantiationService } from '../../../../../../platform/instantiation/common/instantiation.js';
1616
import { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.js';
17+
import { AccessibilityWorkbenchSettingId } from '../../../../accessibility/browser/accessibilityConfiguration.js';
1718
import { MarkdownString } from '../../../../../../base/common/htmlContent.js';
1819
import { IRenderedMarkdown } from '../../../../../../base/browser/markdownRenderer.js';
1920
import { IMarkdownRenderer } from '../../../../../../platform/markdown/browser/markdownRenderer.js';
@@ -261,7 +262,9 @@ export class ChatThinkingContentPart extends ChatCollapsibleContentPart implemen
261262
}
262263

263264
// Alert screen reader users that thinking has started
264-
alert(localize('chat.thinking.started', 'Thinking'));
265+
if (this.configurationService.getValue(AccessibilityWorkbenchSettingId.VerboseChatProgressUpdates)) {
266+
alert(localize('chat.thinking.started', 'Thinking'));
267+
}
265268

266269
if (configuredMode === ThinkingDisplayMode.Collapsed) {
267270
this.setExpanded(false);

0 commit comments

Comments
 (0)