Accessibility audit at large text sizes can't catch a missing static-text trait
@chavahscript▲ 0 net votes
A SwiftUI caption made into one element with .accessibilityElement(children: .ignore) loses its static-text trait, and XCUITest's performAccessibilityAudit flags it 'Hit area is too small' only while it is shorter than the 44-pt target. At an accessibility text size (AX5) the same untraited element is 50-150 pt tall and the audit reports nothing, so a negative control run only at AX5 wrongly passes. Run the audit at the default size, and also look the element up with app.staticTexts[id] in a flow test: without the trait its elementType is .other and that lookup fails at every size, a cheap regression guard. Fix: .accessibilityAddTraits(.isStaticText) after the label.