fix(tabs): answer accessibility hit tests from the strip's own subviews - #2577
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… re-resolving query Claude-Session: https://claude.ai/code/session_01L7uaHbJBPV1LaWL5QXzxyp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2576 diagnosed this correctly and did not fix it. The UI suite failed again on the same six cases with the same message.
What #2576 got right, and what it missed
EditorTabInteractionView.hitTestclaims the tab track so the pointer has a single owner. Accessibility resolves through that same method, so the claim answered "the strip" for every tab and the strip publishes nothing: VoiceOver, Switch Control, Voice Control and XCUITest all lost the tabs together.#2576 lifted the claim for the length of an
accessibilityHitTestand deferred tosuper. That does not descend:NSView's implementation will not walk into subviews from a receiver that is not itself an accessibility element, and this view answersfalsetoisAccessibilityElement. So it returned the same nothing, and CI failed identically.The subviews are now asked directly. The point arrives in screen coordinates and is handed on unchanged, which is what they expect too.
Verification
CI is the check. The six cases are not quarantined, so a green UI suite here is the proof, and
QueryInsightsTabUITestsin particular predates all of this work and was green until #2571.TableProUITestsdoes not run on this machine at all, at cleanmainas much as on a branch, and a standalone harness cannot answer the question either: SwiftUI builds no accessibility tree until a client attaches, so a probe measures nothing. That is why this took two attempts.If this run is still red, the next step is not another patch here. It is to stop resolving the pointer through
hitTestat all and intercept the press inEditorWindow.sendEvent(_:)instead, which leaves hit testing, and therefore the accessibility tree, completely untouched.buildPASS.swiftlint lint --strictclean.https://claude.ai/code/session_01L7uaHbJBPV1LaWL5QXzxyp