add aria label for todo clear button, fix a11y smoketest violation (#292671)

fixes #292665
This commit is contained in:
Megan Rogge
2026-02-03 15:10:06 -06:00
committed by GitHub
parent 74859618a1
commit 80e6a921e8
2 changed files with 7 additions and 2 deletions

View File

@@ -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;

View File

@@ -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']
}
});
});