fix(vscode): use inert instead of aria-hidden on collapsed sidebar

aria-hidden only hides from screen readers; pointer-events: none only
blocks the mouse. Tab focus could still traverse into the hidden
sidebar's worktree buttons and session items. inert handles all three
at once: removes from the a11y tree, blocks pointer events, and prevents
keyboard focus.
This commit is contained in:
marius-kilocode
2026-05-14 10:05:39 +02:00
parent 26f5393be2
commit af5c05de7e
2 changed files with 3 additions and 2 deletions
@@ -2131,7 +2131,7 @@ const AgentManagerContent: Component = () => {
class="am-sidebar"
classList={{ "am-sidebar-collapsed": sidebarCollapsed() }}
style={{ width: sidebarCollapsed() ? "0px" : `${sidebarWidth()}px` }}
aria-hidden={sidebarCollapsed()}
inert={sidebarCollapsed() || undefined}
>
<ResizeHandle
direction="horizontal"
@@ -40,7 +40,8 @@
padding-right: 0;
border-right-width: 0;
overflow: hidden;
pointer-events: none;
/* Pointer events, focus, and a11y tree exclusion are all handled by the
inert attribute on the element. No need for pointer-events: none. */
}
.am-sidebar-collapsed > [data-component="resize-handle"] {