File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/vs/base/browser/ui/actionbar Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
222
222
return ;
223
223
}
224
224
const title = this . getTooltip ( ) ?? '' ;
225
- this . element . setAttribute ( 'aria-label' , title ) ;
225
+ this . updateAriaLabel ( ) ;
226
226
if ( ! this . options . hoverDelegate ) {
227
227
this . element . title = title ;
228
228
} else {
@@ -236,6 +236,13 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
236
236
}
237
237
}
238
238
239
+ protected updateAriaLabel ( ) : void {
240
+ if ( this . element ) {
241
+ const title = this . getTooltip ( ) ?? '' ;
242
+ this . element . setAttribute ( 'aria-label' , title ) ;
243
+ }
244
+ }
245
+
239
246
protected updateClass ( ) : void {
240
247
// implement in subclass
241
248
}
@@ -392,6 +399,13 @@ export class ActionViewItem extends BaseActionViewItem {
392
399
}
393
400
}
394
401
402
+ override updateAriaLabel ( ) : void {
403
+ if ( this . label ) {
404
+ const title = this . getTooltip ( ) ?? '' ;
405
+ this . label . setAttribute ( 'aria-label' , title ) ;
406
+ }
407
+ }
408
+
395
409
override updateChecked ( ) : void {
396
410
if ( this . label ) {
397
411
if ( this . getAction ( ) . checked ) {
You can’t perform that action at this time.
0 commit comments