Skip to content

fix(tabs): keep the editor tabs reachable to accessibility over the pointer's owner - #2576

Merged
datlechin merged 1 commit into
mainfrom
fix/editor-tab-accessibility-hit-test
Aug 29, 2026
Merged

fix(tabs): keep the editor tabs reachable to accessibility over the pointer's owner#2576
datlechin merged 1 commit into
mainfrom
fix/editor-tab-accessibility-hit-test

Conversation

@datlechin

Copy link
Copy Markdown
Member

main has been red since #2571 merged. This is why, and the fix.

What broke

EditorTabInteractionView.hitTest claims the tab track so the pointer has a single owner, which is what #2571 was for. Accessibility resolves a screen point through that same method, so the claim answered "the strip" for every tab, and the strip publishes nothing: there was no element under a tab to speak, press or click.

So this was never only a test problem. VoiceOver, Switch Control and Voice Control lost the tabs at the same time XCUITest did.

The claim is now lifted for the length of an accessibilityHitTest, and the pointer keeps it.

The failures it accounts for

Six cases across all three UI shards, in two suites I added and one that predates the change:

Suite Case Message
EditorTabReorderUITests testAFastDragReordersTheStrip The dragged tab must be hittable
EditorTabReorderUITests testDraggingATabNeverMovesTheWindow The dragged tab must be hittable
EditorTabDetachUITests testMoveTabToNewWindowTakesTheTabOutOfTheStrip The tab must be hittable
EditorTabDetachUITests testClosingTheDetachedWindowLeavesTheOriginalWorking The tab must be hittable
QueryInsightsTabUITests testTheQueryInsightsTabOpensOnceCarriesItsFiltersAndStaysGatedWithoutALicense A tab in the strip must be clickable
EditorTabDetachUITests testTheCommandIsOfferedOnAnIdleTab Multiple matching elements found

The last one is separate and is mine: Move Tab to New Window exists on the AppKit contextual menu the pointer uses and on the SwiftUI menu kept for VoiceOver, so the query matched twice. It now takes firstMatch.

QueryInsightsTabUITests is the one that shows the blast radius: it predates all of this and was green until #2571.

Why I am confident without a local reproduction

main was green at bb0371ea2, the commit before #2571, and has failed every run since f48d20217, which is #2571 itself. The failures are all "not hittable" on editor-tab, and the only change to how those elements are hit-tested is the hitTest claim.

I could not reproduce it here: TableProUITests does not run on this machine at all, at clean main as well as on a branch, and a standalone harness cannot answer the question either because SwiftUI builds no accessibility tree until a client attaches. CI is the verification for this one.

Verified

  • build PASS.
  • swiftlint lint --strict clean.
  • The six failing cases above are the gate. They are not quarantined, so CI on this PR is the check that matters.

https://claude.ai/code/session_01L7uaHbJBPV1LaWL5QXzxyp

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@datlechin
datlechin merged commit 474271b into main Aug 29, 2026
7 of 8 checks passed
@datlechin
datlechin deleted the fix/editor-tab-accessibility-hit-test branch August 29, 2026 15:45
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.

1 participant