File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/vs/base/browser/ui/actionbar Expand file tree Collapse file tree 1 file changed +9
-3
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,8 +399,7 @@ export class ActionViewItem extends BaseActionViewItem {
392
399
}
393
400
}
394
401
395
- override updateTooltip ( ) : void {
396
- super . updateTooltip ( ) ;
402
+ override updateAriaLabel ( ) : void {
397
403
if ( this . label ) {
398
404
const title = this . getTooltip ( ) ?? '' ;
399
405
this . label . setAttribute ( 'aria-label' , title ) ;
You can’t perform that action at this time.
0 commit comments