high priority medium complexity frontend pending frontend specialist Tier 5

Acceptance Criteria

All text/background color pairs across all three screens achieve a minimum contrast ratio of 4.5:1 (normal text) or 3:1 (large text ≥18pt) per WCAG 2.2 SC 1.4.3
All interactive elements (buttons, form fields, icon buttons, copy/share actions) have a minimum touch target of 48×48dp per WCAG 2.2 SC 2.5.8
Every meaningful UI element has a Semantics label; decorative images/icons use excludeFromSemantics: true
Error messages announced by screen readers immediately upon appearance (Semantics(liveRegion: true) or equivalent polite announcement)
Focus order on all three screens follows logical reading order; no focus traps exist outside of intended modal flows
RecruitmentStatsWidget chart/stat elements have text alternatives (Semantics value) conveying the same information as the visual representation
ReferralCodeScreen's copy and share buttons have distinct semantic labels (e.g. 'Copy referral code', 'Share referral code') — not generic 'button'
All three screens pass Flutter's AccessibilityGuideline tests (meetsGuideline(androidTapTargetGuideline) and meetsGuideline(iOSTapTargetGuideline))
Manual VoiceOver (iOS) and TalkBack (Android) test confirms logical announcement order and no unlabelled interactive elements
Screens remain fully usable with font scale factor set to 1.5× (Accessibility Preferences large text)

Technical Requirements

frameworks
Flutter
Riverpod
data models
accessibility_preferences
performance requirements
Accessibility tree traversal adds no more than 2ms per frame to rendering time
Large text mode (1.5× scale) does not cause layout overflow or text truncation
security requirements
Semantics labels must not expose internal IDs, tokens, or PII in their label strings
Screen reader announcements for sensitive fields (phone, email) use generic role labels, not the field value
ui components
ReferralCodeScreen
RecruitmentStatsWidget
NewMemberOnboardingScreen
ErrorBannerWidget
LoadingStateWidget

Execution Context

Execution Tier
Tier 5

Tier 5 - 253 tasks

Can start after Tier 4 completes

Implementation Notes

Start with a systematic audit pass: (1) list all interactive elements per screen, (2) measure touch targets using Flutter Inspector, (3) compute contrast ratios for each color pair from design tokens using WCAG formula. Use the Semantics widget to override default labels where Flutter's autogenerated label is insufficient (e.g. IconButton with only an icon needs a semanticLabel). For the stats widget, wrap each stat card in Semantics(label: '${stat.label}: ${stat.value}', child: ...) to give screen reader users the full value.

Use MergeSemantics where a label + value pair should be announced together. The AccessibilityPreferences data model should inform font scale — read accessibility_preferences.font_scale_factor via a Riverpod provider and inject into MediaQuery in the onboarding flow. Avoid using Opacity widget for disabled states; use ExcludeSemantics or IgnorePointer with appropriate Semantics instead.

Testing Requirements

Automated: add widget tests using meetsGuideline(androidTapTargetGuideline) and meetsGuideline(iOSTapTargetGuideline) for each screen. Write contrast ratio verification tests using the design token color values (compute ratio in test, assert >= 4.5). Test large text mode by overriding MediaQuery textScaleFactor to 1.5 and asserting no RenderOverflow. Manual: execute TalkBack walkthrough on Android emulator and VoiceOver walkthrough on iOS simulator, documenting each interactive element's announced label.

Record findings in a checklist and fix before marking task complete.

Component
New Member Onboarding Screen
ui medium
Epic Risks (3)
medium impact medium prob technical

QR codes rendered at the minimum 200×200 size may fail to scan under typical indoor lighting conditions on older or lower-resolution phone cameras, causing recruitment moments to fail when a peer mentor shows the screen to a prospective member.

Mitigation & Contingency

Mitigation: Set the default QR render size to 260×260 logical pixels (not the 200px minimum) and apply a high-contrast white module background. Test scan reliability on at minimum three physical devices (budget Android, mid-range Android, iPhone SE) before marking the screen as done.

Contingency: If scan reliability remains an issue, add a 'Enlarge QR' full-screen mode triggered by tapping the code, and ensure the text referral URL with copy-to-clipboard is always visible as a fallback sharing method.

high impact medium prob integration

The onboarding screen submits attribution and then hands off to an external membership registration URL (HLF's Dynamics portal or similar). If the external URL is unavailable, changes its format, or requires authentication the new member does not have, the conversion funnel is broken at its final step.

Mitigation & Contingency

Mitigation: Confirm the external registration URL and its expected query parameters with HLF's portal team before implementing the handoff. Record the pending_signup attribution event before launching the URL so data is not lost if the external site fails. Display a fallback message with contact information if the URL launch fails.

Contingency: If the external membership URL is not available at feature launch, implement a temporary form that collects name and email and stores a pending_member record in Supabase, allowing coordinators to manually complete registration while the integration is finalised.

low impact medium prob integration

Embedding the RecruitmentStatsWidget on the peer mentor home screen may conflict with existing layout components (activity summary, badge shelf), causing overflow or requiring a redesign of the home screen that is outside this epic's scope.

Mitigation & Contingency

Mitigation: Design the widget as a horizontally constrained card with a maximum height of 96dp so it can be inserted into any vertical list without overflow. Coordinate with the home screen's existing layout owners before starting the embedding task.

Contingency: If home screen embedding creates unacceptable layout conflicts, defer embedding to a separate home-screen redesign task and make the widget accessible only via the dedicated ReferralCodeScreen for the initial release.