Skip to content

native2: point clicks reach Chrome's vertical tabs under its empty overlay groups (#202) - #222

Merged
iamnbutler merged 2 commits into
mainfrom
fix-chrome-vtabs
Oct 25, 2026
Merged

iamnbutler merged 2 commits into
mainfrom
fix-chrome-vtabs

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Fixes #202

Root cause. In Chrome 156 with vertical tabs (View > Show Tabs Vertically), each tab is an AXRadioButton/AXTabButton with AXPress, but the strip has childless, actionless AXGroups laid over it, covering the whole 240×905 strip. AXUIElementCopyElementAtPosition at a tab returns one of those groups. It has no descendants and its ancestors (AXTabGroup, groups, window) have nothing pressable, so clickPoint refused with "No pressable accessibility element was found".

Fix (DesktopMac/Pointer.swift, beneathOverlay / beneath): when the hit is an empty overlay, meaning an AXGroup with no children and no actions, the point-click candidates also include the pressable elements at the point under its parent, then its grandparent, smallest first. That puts a tab's close button ahead of the tab. They come before the ancestors. The descendant walk still checks frames before reading children (#147).

Checked. In a scratch Chrome (--user-data-dir=/tmp/chrome-b, vertical tabs on), through the standalone host: before, a point click on the "Beta" tab was refused; after, it completes, the window title becomes "Beta - Google Chrome", and Ghostty stays frontmost (background). The same worked for "Gamma". Unit tests are in OverlayClickTests. No recipe needed, since tabs are now clickable by point. Element-ID clicks already worked, because the tabs are listed with AXPress.

…erlay groups (#202)

Chrome's vertical tab strip lays childless, actionless AXGroups over its
tabs. The Accessibility hit test returns one of them, and neither it nor
its ancestors can be pressed, so a point click on a tab was refused. When
the hit is such an empty group, search its parent's and grandparent's
elements at the point (frames checked before children, as for #147) and
press the smallest pressable one.

Fixes #202

Why: native2/Sources/DesktopMac/Pointer.swift#beneath | Chrome's vertical tab strip covers its tabs with empty AXGroups that the AX hit test returns; only such childless, actionless groups give way to what is beneath
@iamnbutler
iamnbutler merged commit 3aa30c1 into main Oct 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chrome vertical-tab sidebar: tab icons have no pressable element

1 participant