Add tap-to-navigate and accessibility to ActivitySummaryPanel
epic-peer-mentor-detail-screen-ui-components-task-012 — Make MentorActivitySummaryPanel tappable: wrapping the card in an InkWell that calls an onTap callback to navigate to the full activity log screen. Add Semantics label describing total activities and a hint indicating it navigates to the log. Verify the card and type breakdown rows meet WCAG 2.2 AA contrast, and add ExcludeSemantics to decorative count bars if present.
Acceptance Criteria
Technical Requirements
Execution Context
Tier 1 - 540 tasks
Can start after Tier 0 completes
Implementation Notes
Wrap the outermost Card/Container of MentorActivitySummaryPanel in a Semantics widget first, then nest the InkWell inside that Semantics node (Semantics โ InkWell โ card content). This ordering ensures the semantic label is announced before the interactive hint. Use `Material(type: MaterialType.transparency)` as the InkWell's ancestor if the card has a custom background, to prevent ink from painting over the card color. For contrast validation during development, use the Flutter DevTools accessibility panel or write a helper that parses Color objects and computes relative luminance per WCAG 2.1 ยง1.4.3.
Design tokens are the single source of truth โ never introduce literal hex values.
Testing Requirements
Widget tests (flutter_test): (1) render with onTap=null โ verify no InkWell in widget tree; (2) render with onTap callback โ verify InkWell present and tap triggers callback exactly once; (3) pump SemanticsController and assert label contains total activity count and hint text; (4) verify ExcludeSemantics wraps each decorative bar; (5) programmatic contrast check: extract foreground/background colors from rendered widget and assert ratio โฅ4.5:1 using a contrast-ratio utility. All tests run in both light and dark theme via ThemeData injection.
The org labels system may not yet have label keys defined for peer mentor detail screen terminology (role labels, section headings), requiring additions to the label key registry that must be coordinated with the admin configuration team.
Mitigation & Contingency
Mitigation: Audit existing label keys in the terminology system before starting OrgLabelsProvider integration. Submit required new label keys for admin configuration in parallel with component implementation.
Contingency: If label keys are not available at integration time, use hardcoded English fallbacks with a clear TODO for admin configuration, ensuring the widget renders correctly while keys are being provisioned.
The design token semantic colors (warning, error surface) may not meet WCAG 2.2 AA 4.5:1 contrast ratio when rendered on the app's background surface tokens, requiring design system changes that affect the entire app.
Mitigation & Contingency
Mitigation: Run contrast ratio validation on the token palette during Epic 1 design token implementation. Flag any failing pairs to the design system owner before building UI components that depend on them.
Contingency: If tokens fail contrast requirements, define supplementary high-contrast override tokens specific to alert and badge contexts that meet AA without modifying the global palette.