Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Engineering Accessibility: Practical, Maintaina...

Engineering Accessibility: Practical, Maintainable, Testable (Do iOS 2025)

Accessibility fixes are easy; Making them fit cleanly into a real codebase is the hard part. This talk shows you how to meet accessibility requirements with tools, automation, and solid engineering practices that keep your code clean and maintainable.

Talk given at Do iOS 2025

Avatar for Robin Kanatzar

Robin Kanatzar

November 14, 2025
Tweet

More Decks by Robin Kanatzar

Other Decks in Technology

Transcript

  1. custom styles // declare style struct FunStyle: ToggleStyle { func

    makeBody(configuration: Configuration) -> some View { ... } } // usage Toggle("Fun Style", isOn: $isOn) .toggleStyle(FunStyle())
  2. struct ParentView: View { var body: some View { MyToggleView(accessibilityLabel:

    "my accessibility label") } } struct MyToggleView: View { var accessibilityLabel: String var body: some View { Toggle("", isOn: $isOn) .toggleStyle(PillToggleStyle()) .accessibilityLabel(accessibilityLabel) } }
  3. custom_rules: a11y_label: included: - ".*\\_molecule.swift" excluded: - ".*\\_atom.swift" name: "Accessibility

    Label" regex: "" message: "Set label at atom level, not molecule" severity: error
  4. unit tests @Test func testDecorativeImageIsHidden() throws { let view =

    Image(systemName: "star.fill") .accessibilityHidden(true) let image = try view.inspect().image() let isHidden = try image.accessibilityHidden() #expect(isHidden == true) } https://github.com/nalexn/ViewInspector
  5. UI tests main flow in largest font app.launchArguments += [

    "-UIPreferredContentSizeCategoryName", "UICTContentSizeCategoryAccessibilityXXXL" ]
  6. override func setUpWithError() throws { continueAfterFailure = true } func

    testPerformAudit() throws { let app = XCUIApplication() app.launch() try app.performAccessibilityAudit() }
  7. override func setUpWithError() throws { continueAfterFailure = true } func

    testPerformAudit() throws { let app = XCUIApplication() app.launch() try app.performAccessibilityAudit(for: .contrast) }
  8. thank y'all! i'm on a mission to make accessible mobile

    apps the default, not the exception