test(ui): add accessibility audit and visual QA sweeps - #15
Merged
Merged
Conversation
The project had no automated accessibility coverage at all, and performAccessibilityAudit was never used anywhere. AccessibilityAuditUITests runs XCTest's auditor over Dashboard, Reminders, Weather and Settings, then repeats the sweep pinned to UICTContentSizeCategoryAccessibilityXXXL. The auditor catches what a normal UI test cannot see: unlabeled controls, labels that duplicate their trait, text clipped at large Dynamic Type, contrast below the WCAG threshold, and hit regions under 44pt. Issues are reported with the screen name and the run continues, so one pass enumerates all of them instead of stopping at the first. VisualQAScreenshotTests captures the four primary screens in light, dark, AX-XXXL and Spanish. Those are the combinations that break Liquid Glass layouts in practice: dark-mode glass contrast, clipping at accessibility sizes, and Spanish string expansion. Both suites disable the ad SDK. Google's banner is a third-party view whose accessibility this project cannot fix, and its network fetch makes the audit nondeterministic.
The audit type and compactDescription name what failed (contrast, clipped text) but not which control, so a real finding couldn't be traced back to the view that needs fixing. Added issue.element to the failure message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The project had no automated accessibility coverage, and
performAccessibilityAuditappeared nowhere in the codebase.AccessibilityAuditUITestsruns XCTest's auditor over Dashboard, Reminders, Weather and Settings, then repeats the whole sweep pinned toUICTContentSizeCategoryAccessibilityXXXL. The auditor catches the defects a normal UI test can't see — unlabeled controls, labels duplicating their trait, text clipped at large Dynamic Type, contrast under the WCAG threshold, hit regions below 44 pt. Each issue is reported with its screen name and the run continues, so one pass enumerates everything rather than stopping at the first.VisualQAScreenshotTestscaptures the four primary screens across light, dark, AX-XXXL and Spanish — the combinations that actually break Liquid Glass layouts: dark-mode glass contrast, clipping at accessibility sizes, and Spanish string expansion (typically 20–30% longer than English). Screenshots land in/tmp/sunhat-shotsand attach to the xcresult.Both suites pass
-sunhatDisableAdSDK. Google's banner is a third-party view whose accessibility this project can't fix, and its network fetch makes the audit nondeterministic.Closes the dark-mode, Dynamic Type and VoiceOver QA items that have been open on the tracker.
Both APIs were verified against the 26.6 SDK before use —
performAccessibilityAuditandXCUIDevice.appearanceboth live inXCUIAutomation.frameworknow, notXCTest.framework.