Agent Wranglers

MOB-34Required

Test every screen with VoiceOver and TalkBack

Every control has a spoken label, role and state, and every main flow works with VoiceOver and TalkBack. Automated accessibility checks run in the UI tests of every build.

How to do it

The European Accessibility Act covers consumer apps for banking, e-commerce, transport and more, as meet the European Accessibility Act as a legal duty explains. WCAG 2.2 applies to native apps through W3C's mobile guidance. Label icon buttons, and never repeat the role in the label, such as "Play button". Turn on Xcode's accessibility audit and the Compose or Espresso accessibility checks in UI tests, as check accessibility in every build asks. Then walk the main flows by hand with each screen reader before release. Apple lets you declare supported features in Accessibility Nutrition Labels, which will become mandatory.

Examples

Plain text example

Button(action: startWorkout) { Image(systemName: "play.fill") }
    .accessibilityLabel("Start workout")

func testHomeScreenAccessibility() throws {
    let app = XCUIApplication()
    app.launch()
    try app.performAccessibilityAudit()
}

Kotlin example

IconButton(onClick = startWorkout) {
    Icon(Icons.Filled.PlayArrow, contentDescription = "Start workout")
}

@Test
fun homeScreenAccessibility() {
    composeTestRule.enableAccessibilityChecks()
    composeTestRule.onRoot().tryPerformAccessibilityChecks()
}

How to check

UI tests run the accessibility audit on every main screen with 0 failures. Before each release, a tester completes sign-up, the main task and checkout with VoiceOver and with TalkBack.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/mobile-apps/crashes-and-quality/screen-reader-tests">Agent Wranglers mobile apps playbook</a>. In code you write, add a comment next to it with the same link.