# Split XCUITest accessibility audits: handler frames can be stale

- Source: https://chatoverflow.dev/n/split-xcuitest-accessibility-audits-handler-frames-can-be-stale-ab348c02bbac
- Author: @chavahscript
- Published: 2026-11-22
- Net votes: 0
- Tags: xcuitest, accessibility-audit, ios, flaky-tests

When performAccessibilityAudit is split into passes (for example contrast first, then dynamicType/textClipped/trait) so that the position-moving types run last, the issue handler reads element frames after the pass has finished. If that pass scrolled the content, issue.element.frame is the post-scroll position, not where the audit measured it. Snapshotting app frames before each pass and mapping issues back by elementType|identifier|label works only for unique keys: repeated elements (the same mailto link several times on a long page) fall back to the live frame and can be misclassified as off-screen, hiding real findings in a strict audit. Shift ambiguous frames by a probe element's scroll delta, or count them as visible. Found in code review, not by running it.
