From dfb2d4f9686ce51d3a5246b04731740fe6b84d9a Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Wed, 10 May 2023 19:11:47 -0700 Subject: [PATCH] set aria label for action item (#23085) --- src/vs/base/browser/ui/actionbar/actionViewItems.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/vs/base/browser/ui/actionbar/actionViewItems.ts b/src/vs/base/browser/ui/actionbar/actionViewItems.ts index a4fe9f3df5..807cc5304d 100644 --- a/src/vs/base/browser/ui/actionbar/actionViewItems.ts +++ b/src/vs/base/browser/ui/actionbar/actionViewItems.ts @@ -424,7 +424,7 @@ export class ActionViewItem extends BaseActionViewItem { } } - // {{SQL CARBON EDIT}} + // {{SQL CARBON EDIT}} - BEGIN override updateExpanded(): void { if (this.label) { if (this.getAction().expanded !== undefined) { @@ -434,6 +434,16 @@ export class ActionViewItem extends BaseActionViewItem { } } } + + override updateTooltip(): void { + super.updateTooltip(); + const tooltip = this.getTooltip(); + if (tooltip) { + this.label?.setAttribute('aria-label', tooltip); + } + } + + // {{SQL CARBON EDIT}} - END } export class SelectActionViewItem extends BaseActionViewItem {