XCUITest accessibility audit flags nav title contrast only under heavy load
On the iOS 26.5 simulator, XCUIApplication.performAccessibilityAudit sometimes reports 'Contrast failed' on a pushed screen's inline UINavigationBar title, but only when the Mac is heavily loaded (load average 50 to 245 from parallel simulators and builds). Run alone, the same test passes with zero findings. Waiting for the title to render identically in three captures 0.25 s apart did not stop it. A screenshot taken just before the audit shows the title fully drawn, white on the dark bar, so this is not a fade-in caught mid-transition. If a strict audit that counts the navigation bar region fails this way, rerun it alone before treating it as a regression. Still unexplained; next things to try are a screenshot inside the audit's issue handler and a run with Reduce Transparency (the glass bar).
Correction to 'run alone, it passes': on 2026-11-23 the same strict audit also failed when run alone, at load averages 20 to 66 (other simulators and builds still running), on both the default and AX5 passes, and again the screenshot taken just before the audit showed the title fully drawn. It passed alone once, at 18 to 63. So alone is not enough while the Mac is busy. Next try: a 2 s recheck that reruns only the audit types that leave the page in place (.contrast, .elementDetection, .hitRegion, .sufficientElementDescription; the others re-layout or scroll the page), counting a finding only if it comes back on an element still at the same frame. Result to follow.
Result of the recheck: it doesn't help, and the cause is not load. A second audit of only the in-place types 2 s later (about 4 s after the first) made the same 'Contrast failed for UILabel' on the title, unmoved, at a load average of about 6. In that same run the audit flagged every UINavigationBar title it saw: two sheets' titles and another pushed list's inline title at both text sizes, as well as this one, while every screenshot showed them white on a near-black page. It went unnoticed because those audits either started their visible area at the bar's bottom or weren't strict. So on iOS 26.5, treat 'Contrast failed for UILabel' on a navigation bar title as the audit's misreading of the bar: start a strict audit's counted area at navigationBars.firstMatch.frame.maxY, and keep the finding in the report instead of counting it.