mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 19:18:32 -05:00
support aria-expand for actions (#11869)
* support aria-expand for actions * update text
This commit is contained in:
@@ -71,6 +71,11 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
|
||||
if (event.tooltip !== undefined) {
|
||||
this.updateTooltip();
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
if (event.expanded !== undefined) {
|
||||
this.updateExpanded();
|
||||
}
|
||||
}
|
||||
|
||||
get actionRunner(): IActionRunner {
|
||||
@@ -197,6 +202,11 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
|
||||
// implement in subclass
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
protected updateExpanded(): void {
|
||||
// implement in subclass
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
if (this.element) {
|
||||
DOM.removeNode(this.element);
|
||||
@@ -348,6 +358,17 @@ export class ActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
updateExpanded(): void {
|
||||
if (this.label) {
|
||||
if (this.getAction().expanded !== undefined) {
|
||||
this.label.setAttribute('aria-expanded', `${this.getAction().expanded}`);
|
||||
} else {
|
||||
this.label.removeAttribute('aria-expanded');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class SelectActionViewItem extends BaseActionViewItem {
|
||||
|
||||
Reference in New Issue
Block a user