high priority low complexity testing pending testing specialist Tier 1

Acceptance Criteria

AccessibilityAuditRunner class exists in the integration_test/ directory (or a test-only package), not in lib/
The class file imports flutter_test and SemanticsController without importing any production lib/ files that would add production footprint
AccessibilityAuditRunner has a runAll(WidgetTester tester) async method (or equivalent) that currently returns Future<List<AuditResult>> with an empty list
AuditResult is a typed value class defined in the test harness with at minimum: checkName (String), passed (bool), violations (List<String>)
The integration test entry point (integration_test/accessibility_audit_test.dart or equivalent) exists and references AccessibilityAuditRunner.runAll()
Running `flutter test integration_test/accessibility_audit_test.dart` completes without errors (empty runAll produces zero failures)
The class is NOT referenced from any file under lib/ — confirmed by grep showing no lib/ imports of AccessibilityAuditRunner
pubspec.yaml does not add any new production dependencies — only dev_dependencies additions are permitted
A brief inline comment in the runner explains the intended population pattern for subsequent tasks
The scaffold compiles cleanly with `flutter analyze` showing zero new warnings or errors

Technical Requirements

frameworks
Flutter
flutter_test
apis
SemanticsController (flutter_test)
WidgetTester
IntegrationTestWidgetsFlutterBinding
data models
AuditResult (new test-only value class)
performance requirements
Empty runAll() must complete in under 500ms in CI
Scaffold must not add measurable overhead to the production app binary size
security requirements
No production secrets, API keys, or Supabase credentials referenced in test harness files
integration_test/ directory must not be included in any production build step

Execution Context

Execution Tier
Tier 1

Tier 1 - 540 tasks

Can start after Tier 0 completes

Implementation Notes

Place AccessibilityAuditRunner in integration_test/helpers/accessibility_audit_runner.dart to keep it clearly separated from production code. Use IntegrationTestWidgetsFlutterBinding.ensureInitialized() in the test entry point. Define AuditResult as an @immutable class or record (Dart 3 records are acceptable if the project targets Dart 3+). The runAll() signature should accept WidgetTester to allow future audit steps to pump widgets and interact with SemanticsController.

Add a TODO comment in runAll() body listing the checks to be added in subsequent tasks (modal close, back control, horizontal swipe, semantics labels) so the intended scope is clear to whoever implements those tasks. Confirm with the team that integration_test/ is excluded from the production build pipeline — standard Flutter project setup does this automatically, but CI pipelines with custom build steps may need an explicit exclusion.

Testing Requirements

Verification via `flutter test` and `flutter analyze`. Confirm: (1) `flutter test integration_test/accessibility_audit_test.dart` exits with code 0, (2) `flutter analyze` reports zero new issues after scaffold addition, (3) `grep -r 'AccessibilityAuditRunner' lib/` returns zero matches confirming no production references, (4) `flutter build apk --release` (or iOS equivalent) succeeds and binary size does not increase vs baseline — confirming zero production footprint. No functional unit tests needed for the scaffold itself — the scaffold's purpose is to be a stable base for subsequent test tasks.

Component
Accessibility Audit Runner
infrastructure medium
Epic Risks (2)
high impact medium prob dependency

Flutter's SemanticsController used in integration tests is an internal or semi-internal API that can break between Flutter stable releases. If the audit runner relies heavily on undocumented semantics tree traversal, a Flutter upgrade could silently disable the audit checks without a build failure, creating false confidence.

Mitigation & Contingency

Mitigation: Use only the public flutter_test accessibility APIs (meetsGuideline, SemanticsController.ensureSemantics) and wrap all SemanticsController calls in a versioned helper class with explicit assertions that the expected semantics tree shape is still available. Pin the Flutter SDK range in pubspec.yaml.

Contingency: If SemanticsController APIs break on a Flutter upgrade, fall back to widget-level golden tests that include the semantics tree snapshot, combined with manual Switch Access and VoiceOver QA checklists executed before each release.

low impact medium prob resource

Flutter integration tests that simulate Switch Access traversal on multiple screens can be slow (30–120 seconds per test flow), which may make the audit runner impractical to run on every CI commit if the test suite already has long run times.

Mitigation & Contingency

Mitigation: Scope the audit runner to a dedicated integration test target that runs on pull requests targeting main and on nightly builds, not on every push. Parallelise test shards in CI to keep wall-clock time acceptable. Profile audit run times during development and trim any flows that duplicate coverage.

Contingency: If CI run times exceed acceptable thresholds, split the audit runner into a fast smoke suite (touch targets and semantic labels only, runs on every PR) and a thorough traversal suite (Switch Access simulation, runs nightly), with the nightly failure blocking the release branch rather than every PR.