Skip to content

Commit d4d52da

Browse files
committed
react to @bpasero feedback
1 parent 2b53bc7 commit d4d52da

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/vs/base/browser/ui/actionbar/actionViewItems.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
222222
return;
223223
}
224224
const title = this.getTooltip() ?? '';
225-
this.element.setAttribute('aria-label', title);
225+
this.updateAriaLabel();
226226
if (!this.options.hoverDelegate) {
227227
this.element.title = title;
228228
} else {
@@ -236,6 +236,13 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
236236
}
237237
}
238238

239+
protected updateAriaLabel(): void {
240+
if (this.element) {
241+
const title = this.getTooltip() ?? '';
242+
this.element.setAttribute('aria-label', title);
243+
}
244+
}
245+
239246
protected updateClass(): void {
240247
// implement in subclass
241248
}
@@ -392,8 +399,7 @@ export class ActionViewItem extends BaseActionViewItem {
392399
}
393400
}
394401

395-
override updateTooltip(): void {
396-
super.updateTooltip();
402+
override updateAriaLabel(): void {
397403
if (this.label) {
398404
const title = this.getTooltip() ?? '';
399405
this.label.setAttribute('aria-label', title);

0 commit comments

Comments
 (0)