Accessibility Audit Runner
Component Detail
Description
A development-time utility that automates gesture-accessibility checks using Flutter's SemanticsController and integration test helpers. Simulates Switch Access traversal order and Full Keyboard Access navigation to verify all interactive elements are reachable without touch gestures.
accessibility-audit-runner
Summaries
The Accessibility Audit Runner transforms accessibility compliance from a manual, error-prone review process into an automated quality gate that runs on every code change. For a product whose primary users depend on Switch Access and Full Keyboard Access, shipping a screen where a button is unreachable by keyboard or assistive technology navigation is a critical product defect — not a cosmetic issue. By catching these failures automatically in CI before they reach users, this tool protects the product's core value proposition and prevents the reputational damage that comes from accessibility regressions. It also reduces the manual QA burden on accessibility testing, freeing human reviewers for higher-judgment evaluations.
Accessibility Audit Runner is a development-time utility with medium complexity, scoped exclusively to the test and CI environment. It has no production dependencies, which limits its delivery risk. The primary scheduling consideration is CI integration: the tool must be wired into the test pipeline before the first accessibility-sensitive feature ships, or its value is deferred. `generateAuditReport()` output format should be agreed upon with the QA and engineering leads early so CI failure reporting is actionable.
Ongoing maintenance burden is moderate — as new interactive widgets and flows are added, audit coverage must be extended. Assign a rotating owner to review audit reports and ensure new coverage is added with each feature sprint. Flutter integration test environment setup may add initial CI configuration time.
Accessibility Audit Runner uses Flutter's SemanticsController and integration_test helpers to programmatically traverse widget trees. `runSwitchAccessAudit(widgetTree)` simulates the focus traversal order that Switch Access would follow, verifying no interactive element is skipped or unreachable. `runKeyboardAccessAudit(widgetTree)` exercises tab/focus order through modals and dialogs. `checkTouchTargetSizes(widgetTree)` uses SemanticsNode bounding boxes to assert a minimum 44x44dp hit area on all Semantics-wrapped interactives.
`assertNoGestureOnlyActions(widgetTree)` checks that no action is exclusively triggered via GestureDetector without a corresponding Semantics action. `runFullAudit()` composes all checks and calls `generateAuditReport()`, returning a structured object suitable for serialization to JSON for CI artifact storage. All methods are async and designed for use inside `testWidgets` or `integrationTest` test bodies.
Responsibilities
- Execute Switch Access traversal order checks on key flows
- Simulate Full Keyboard Access navigation through modals and dialogs
- Assert every interactive element has a minimum 44x44dp touch target
- Generate a report of accessibility violations for CI integration
Interfaces
runSwitchAccessAudit(widgetTree)
runKeyboardAccessAudit(widgetTree)
checkTouchTargetSizes(widgetTree)
generateAuditReport()
assertNoGestureOnlyActions(widgetTree)
runFullAudit()