Add accessibility support to summary share overlay
epic-annual-impact-summary-ui-components-task-015 — Wire SummaryAccessibilityProvider to the SummaryShareOverlay to ensure all share action buttons have descriptive Semantics labels, the preview image has an alt-text announcement, and focus is correctly moved to the first interactive element when the sheet opens. Verify dismiss gesture is accessible via screen reader.
Acceptance Criteria
Technical Requirements
Execution Context
Tier 3 - 413 tasks
Can start after Tier 2 completes
Implementation Notes
Consume SummaryAccessibilityProvider via BlocBuilder or a simple InheritedWidget read — do not duplicate label strings in the overlay file. Build dynamic alt-text for the preview by combining stat totals: 'Annual impact card: {activityCount} activities, {milestoneCount} milestones earned'. For the focus management, store the share button's FocusNode as a field on the State class, call requestFocus inside addPostFrameCallback in initState (or didChangeDependencies if data-driven). For reduced-motion, conditionally swap AnimationController durations to Duration.zero or wrap with AnimatedSwitcher that checks the flag.
Avoid using ExcludeSemantics on the scrim — instead give the scrim a GestureDetector + Semantics with an onTap action labelled 'Dismiss'.
Testing Requirements
Write Flutter widget tests using SemanticsController: (1) assert all interactive Semantics labels are non-empty strings; (2) assert preview image Semantics label contains activity count; (3) assert scrim has a dismiss Semantics action; (4) assert focus node receives focus on open. Run flutter analyze --no-fatal-infos to catch missing Semantics. Perform manual VoiceOver smoke test on TestFlight build: navigate entire overlay via swipe-right without touching the screen directly. Target: zero unlabelled interactive elements reported by Accessibility Inspector.
Simultaneous count-up animations across multiple stat cards and chart draw-in animations on lower-end Android devices may cause frame drops below 60fps, degrading the premium Wrapped experience and making the feature feel unpolished.
Mitigation & Contingency
Mitigation: Stagger animation starts using AnimationController with staggered intervals rather than starting all animations simultaneously. Use RepaintBoundary around each animated widget to isolate rasterisation. Profile on a mid-range Android device (e.g., equivalent to Pixel 4a) during development, not just at QA.
Contingency: If frame rate targets cannot be met on low-end devices, implement a device-capability check at startup and substitute simpler fade-in animations for the count-up and chart draw-in on devices below a CPU performance threshold.
The activity-type-breakdown-widget must render organisation-specific activity type labels sourced from the terminology system. If the terminology provider is not yet integrated at the time this widget is built, the widget will display hardcoded system labels, which is a regression risk for multi-org support.
Mitigation & Contingency
Mitigation: Accept activity type labels as a typed parameter in the widget constructor rather than reading from the terminology provider directly inside the widget. The BLoC or repository layer resolves labels before passing them to the widget, maintaining clean separation and testability.
Contingency: If terminology resolution is unavailable at widget integration time, display internal activity type keys as a temporary fallback with a localised suffix '(label pending)' visible only in non-production builds so QA can identify unresolved labels.