fix(ios): report keyboard focus from the AX bridge's is-editing trait
Merged
OK
2mo ago+35+35+01234567890123456789-1-1-0123456789
Summary
From e2e feedback: on an iOS simulator, no text input ever reported as focused, so is focused failed for a focused SwiftUI TextField or TextEditor. The simulator AX bridge set focused only from hasFocus, which these inputs do not report.
The snapshot tree now also reads focused from AX traits bit 21 (is-editing), the same bit XCTest maps hasKeyboardFocus to.
2 files touched (platform-apple snapshot source). Split from the companion sheet occlusion fix (#3162).
Validation
Tested commit: c268e6fa1 (on upstream/main 9a245d0ef).
pnpm vitest run packages/platform-apple/src/snapshot-source/tree.test.ts: 12 passedpnpm check:affected --run --base upstream/main: all runnable checks passed (269 files / 1758 related tests). The first run hit one unrelated failure intest/integration/provider-scenarios/managed-runtime-automation.test.ts("managed screenshot failure keeps demo-mode cleanup on its private transport", hermetic signal guard on a process-group kill). That test does not touch this diff. It passed 3/3 in isolation, and the full gate passed on rerun, so this looks like a flake under load.- Live, iOS 27 sim with a SwiftUI repro (pre-split head):
is focusedis true for a focusedTextFieldandTextEditor.