Conversation
|
@lapfelix This is exactly what I've been looking for! Appreciate the work on this, it works well for me. Really hope it could be merged into the main branch. Have you looked into interacting with the "Sign in with Apple" modals? idb seems pretty unreliable in describing them and I'm wondering if it could be improved in a similar way? |
|
I think a lot has changed since this PR was filed (sorry for the delay). Quite happy to have another look at this, but recent changes should mean that this is viable using the If this doesn't work for you then lmk. At worst case we can expose the "point grid" approach in the old backend. However, the performance here won't be great (you're talking 100s of ms due to XPC overheads). |
Motivation
idb ui describewas not reliably returning accessibility elements inside embedded web content (WebView), even when those elements were present and VoiceOver-accessible.Root causes:
describepath did not enable remote-content discovery options.AXWeb*container roles, which could overstate “already covered” area and suppress remote probing.Implemented changes:
CompanionLib/FBIDBCommandExecutor.m: enabled remote discovery for describe calls by settingcollectFrameCoverageand defaultremoteContentOptions.FBSimulatorControl/Commands/FBSimulatorAccessibilityCommands.m: excluded web container roles (AXWeb*/Web*) from base frame coverage; added near-full-coverage fallback probing (coverage >= 0.98); allowed seen/frontmost/unknown PID hits in that fallback path to recover hidden content; skipped near-fullscreen proxy hits to avoid duplicate wrappers; kept explicit unsigned index conversions needed for strict warning-as-error builds.FBSimulatorControlTests/Utilities/AccessibilityDoubles.handFBSimulatorControlTests/Utilities/AccessibilityDoubles.m: added translation-to-element mapping support in the translator double so tests can model frontmost-tree vs hit-tested remote elements.FBSimulatorControlTests/Tests/Unit/FBSimulatorAccessibilityCommandsTests.m: added targeted regression tests:testCoverageCalculationSkipsWebContentRoleElementstestRemoteDiscoveryFindsHiddenContentWhenCoverageIsNearFulltestRemoteDiscoverySkipsFullscreenProxyInNearFullCoverageModeFBSimulatorControlTests/Tests/Unit/FBSimulatorAccessibilityCommandsTests.m: retained test-onlyint64_tcasts needed to satisfy strict sign-compare checks in this toolchain.Compatibility:
Test Plan
Build tests target:
Run accessibility unit suite:
Result:
21 tests, 0 failures(includes all new regression tests).Build companion libraries:
Manual runtime verification on booted simulator:
Verified output includes embedded webview labels/element.
Related PRs
None.
I accepted the CLA