From 80e6a921e8bfbb9da36bd2f934474935bf249dba Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Tue, 3 Feb 2026 15:10:06 -0600 Subject: [PATCH] add aria label for todo clear button, fix a11y smoketest violation (#292671) fixes #292665 --- .../browser/widget/chatContentParts/chatTodoListWidget.ts | 1 + test/smoke/src/areas/accessibility/accessibility.test.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.ts b/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.ts index c58fdfc1206..d21b5f1af40 100644 --- a/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.ts @@ -199,6 +199,7 @@ export class ChatTodoListWidget extends Disposable { private createClearButton(): void { this.clearButton = new Button(this.clearButtonContainer, { supportIcons: true, + ariaLabel: localize('chat.todoList.clearButton', 'Clear all todos'), }); this.clearButton.element.tabIndex = 0; this.clearButton.icon = Codicon.clearAll; diff --git a/test/smoke/src/areas/accessibility/accessibility.test.ts b/test/smoke/src/areas/accessibility/accessibility.test.ts index d6f02874590..7f912764a04 100644 --- a/test/smoke/src/areas/accessibility/accessibility.test.ts +++ b/test/smoke/src/areas/accessibility/accessibility.test.ts @@ -122,7 +122,9 @@ export function setup(logger: Logger, opts: { web?: boolean }, quality: Quality) // These are used intentionally for selection semantics even though technically not spec-compliant 'aria-allowed-attr': ['monaco-list', 'monaco-list-row'], // Some icon buttons have empty aria-label during rendering - 'aria-command-name': ['codicon-plus'] + 'aria-command-name': ['codicon-plus'], + // Todo list widget has clear button nested inside expander button for layout purposes + 'nested-interactive': ['todo-list-container'] } }); }); @@ -158,7 +160,9 @@ export function setup(logger: Logger, opts: { web?: boolean }, quality: Quality) // These are used intentionally for selection semantics even though technically not spec-compliant 'aria-allowed-attr': ['monaco-list', 'monaco-list-row'], // Some icon buttons have empty aria-label during rendering - 'aria-command-name': ['codicon-plus'] + 'aria-command-name': ['codicon-plus'], + // Todo list widget has clear button nested inside expander button for layout purposes + 'nested-interactive': ['todo-list-container'] } }); });