From e7d9448e24a2ed25f4291054366a44118a72642b Mon Sep 17 00:00:00 2001 From: Dmitriy Vasyura Date: Sun, 28 Dec 2025 01:00:22 -0800 Subject: [PATCH 1/2] Avoid setting state-related ARIA attributes on separators --- src/vs/base/browser/ui/actionbar/actionViewItems.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vs/base/browser/ui/actionbar/actionViewItems.ts b/src/vs/base/browser/ui/actionbar/actionViewItems.ts index ea705bcaa68..4bc0f0a15d3 100644 --- a/src/vs/base/browser/ui/actionbar/actionViewItems.ts +++ b/src/vs/base/browser/ui/actionbar/actionViewItems.ts @@ -402,6 +402,10 @@ export class ActionViewItem extends BaseActionViewItem { } protected override updateEnabled(): void { + if (this.action.id === Separator.ID) { + return; + } + if (this.action.enabled) { if (this.label) { this.label.removeAttribute('aria-disabled'); @@ -427,6 +431,10 @@ export class ActionViewItem extends BaseActionViewItem { } protected override updateChecked(): void { + if (this.action.id === Separator.ID) { + return; + } + if (this.label) { if (this.action.checked !== undefined) { this.label.classList.toggle('checked', this.action.checked); From fc6010a9f0205ba87621ce7b28ee6eeb5575fa2f Mon Sep 17 00:00:00 2001 From: Dmitriy Vasyura Date: Tue, 30 Dec 2025 04:01:50 -0800 Subject: [PATCH 2/2] PR feedback --- src/vs/base/browser/ui/actionbar/actionViewItems.ts | 8 -------- src/vs/base/common/actions.ts | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/vs/base/browser/ui/actionbar/actionViewItems.ts b/src/vs/base/browser/ui/actionbar/actionViewItems.ts index 4bc0f0a15d3..ea705bcaa68 100644 --- a/src/vs/base/browser/ui/actionbar/actionViewItems.ts +++ b/src/vs/base/browser/ui/actionbar/actionViewItems.ts @@ -402,10 +402,6 @@ export class ActionViewItem extends BaseActionViewItem { } protected override updateEnabled(): void { - if (this.action.id === Separator.ID) { - return; - } - if (this.action.enabled) { if (this.label) { this.label.removeAttribute('aria-disabled'); @@ -431,10 +427,6 @@ export class ActionViewItem extends BaseActionViewItem { } protected override updateChecked(): void { - if (this.action.id === Separator.ID) { - return; - } - if (this.label) { if (this.action.checked !== undefined) { this.label.classList.toggle('checked', this.action.checked); diff --git a/src/vs/base/common/actions.ts b/src/vs/base/common/actions.ts index 9660e763095..6d3e3f2b3db 100644 --- a/src/vs/base/common/actions.ts +++ b/src/vs/base/common/actions.ts @@ -228,7 +228,7 @@ export class Separator implements IAction { readonly tooltip: string = ''; readonly class: string = 'separator'; readonly enabled: boolean = false; - readonly checked: boolean = false; + readonly checked: undefined = undefined; async run() { } }