critical priority medium complexity testing pending testing specialist Tier 4

Acceptance Criteria

All interactive elements on all four screens have a minimum touch target size of 44×44 logical pixels (WCAG 2.5.5)
All text and UI components meet WCAG AA contrast ratio: at least 4.5:1 for normal text and 3:1 for large text and UI component boundaries
All status badge color variants (pending, sent, acknowledged, error) pass 3:1 contrast ratio for the badge icon/text against its background
Every interactive element reachable by keyboard/switch access has a descriptive Semantics label; no element relies solely on visual position for meaning
Focus traversal order on all screens follows a logical top-to-bottom, left-to-right reading order with no focus traps
Async state changes (loading → loaded, submitting → success/error) emit live region announcements audible to VoiceOver and TalkBack users without requiring re-focus
The DeclarationAcknowledgementScreen scroll gate does not trap focus or prevent screen reader users from accessing the checkbox before scrolling
All form fields in DriverFeeRegistrationForm have associated labels announced by screen readers; inline error messages are linked to their field via Semantics
A documented audit report lists each screen, each violation found, the WCAG criterion violated, and the fix applied or scheduled
Zero WCAG AA violations remain unfixed after this task is complete; any WCAG AAA items are documented as 'noted, not blocking'

Technical Requirements

frameworks
Flutter
Dart
flutter_test (accessibility matchers)
performance requirements
Accessibility tree queries during widget tests must not time out on low-spec CI runners — avoid excessive Semantics node depth by merging redundant nodes
security requirements
Screen reader label text for sensitive fields (driver identity, declaration content) must not expose confidential data beyond what is displayed visually
ui components
DriverAssignmentList
DeclarationSendScreen
DeclarationAcknowledgementScreen
DriverFeeRegistrationForm
DeclarationStatusBadge (all variants)

Execution Context

Execution Tier
Tier 4

Tier 4 - 323 tasks

Can start after Tier 3 completes

Implementation Notes

Start with automated checks using Flutter's meetsGuideline matchers to triage the bulk of issues quickly. Then proceed to manual screen reader testing for nuanced issues (live regions, focus order, meaningful label context) that automated matchers cannot fully detect. For live region announcements, use Flutter's SemanticsService.announce() or wrap async state transition widgets in a Semantics node with liveRegion: true. For the scroll gate accessibility issue on DeclarationAcknowledgementScreen, consider adding a Semantics(explicitChildNodes: true) wrapper and ensure TalkBack users can navigate to the checkbox regardless of scroll position via the accessibility tree.

Color contrast fixes must be applied in src/visualization/styles.css or the design token system — never hardcode corrected colors inline in widget files. Refer to WCAG 2.2 criterion 1.4.3 (Contrast), 2.5.5 (Target Size), 4.1.3 (Status Messages) as the primary checklist.

Testing Requirements

Use Flutter's built-in meetsGuideline() accessibility matcher (tester.pumpAndSettle + expect(tester, meetsGuideline(androidTapTargetGuideline)) and iOSTapTargetGuideline) for all four screens. Use meetsGuideline(textContrastGuideline) for color contrast. Manually test with VoiceOver on iOS and TalkBack on Android against a physical device or simulator for each screen. Document each manual test step in the audit report.

Automated tests should be added to the widget test suite so regressions are caught in CI. All accessibility widget tests must pass before the task is closed.

Epic Risks (3)
high impact medium prob technical

The declaration acknowledgement screen has the most complex accessibility requirements of any screen in this feature: scrollable long-form legal text, a conditional checkbox that is only enabled after reading, and a timestamp capture. Incorrect focus management or missing semantics annotations could fail VoiceOver navigation or cause the screen reader to announce the checkbox as available before the driver has scrolled, undermining the legal validity of the acknowledgement.

Mitigation & Contingency

Mitigation: Build the acknowledgement screen against the WCAG 2.2 AA checklist from the start, not as a post-hoc audit. Use semantics-wrapper-widget and live-region-announcer from the platform's accessibility toolkit. Include a VoiceOver test session in the acceptance criteria with a tester using the screen reader.

Contingency: If WCAG compliance cannot be fully achieved within the sprint, ship the screen with a documented list of accessibility gaps and a follow-up sprint commitment. Do not block the declaration workflow launch if the core interaction works but a non-critical semantics annotation is missing.

medium impact medium prob integration

Drivers receive a push notification with a deep link to the declaration acknowledgement screen for a specific assignment. If the deep link handler does not correctly route to the right screen and assignment context — particularly when the app is launched cold from the notification — the driver may see a blank screen or the wrong declaration.

Mitigation & Contingency

Mitigation: Implement and test all three notification scenarios: app foregrounded, app backgrounded, and cold start. Use the platform's existing deep-link-handler infrastructure. Add integration tests that simulate notification tap events and assert correct screen and data loading.

Contingency: If cold-start deep link routing proves unreliable, implement a notification-centre fallback where the driver can find the pending declaration from the notification centre screen, ensuring the workflow can always complete even if the direct deep link fails.

medium impact low prob technical

If the driver-feature-flag-guard has any rendering edge case — such as a brief flash of driver UI before the flag value is loaded, or a guard that fails open on a flag service error — driver-specific UI elements could be momentarily visible to coordinators in organizations that have not opted in, causing confusion and potentially a support escalation.

Mitigation & Contingency

Mitigation: Default the guard to rendering nothing (not a loading indicator) until the flag value is definitively resolved. Treat flag service errors as flag-disabled to fail closed. Write widget tests covering the loading, disabled, and enabled states including the error case.

Contingency: If fail-closed cannot be guaranteed within the sprint, add a server-side RLS check on the driver assignment endpoints so that even if the UI guard leaks, the data layer refuses to return driver data for organizations without the flag enabled.