set aria label for action item (#23085)

This commit is contained in:
Alan Ren
2023-05-10 19:11:47 -07:00
committed by GitHub
parent 9a1121d70a
commit dfb2d4f968

View File

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