high priority low complexity frontend pending frontend specialist Tier 2

Acceptance Criteria

WizardProgressIndicator widget accepts: totalSteps (int), currentStep (int, 1-based), stepTitles (List<String>)
Renders numbered dots for each step with distinct visual states: completed (filled, checkmark), active (filled, current color), upcoming (outlined)
Step title of the current step is displayed as a text label below the dot row
Each dot is wrapped in Semantics with label: 'Step {n} of {totalSteps}, {stepTitle}, {state}' where state is 'completed', 'current', or 'upcoming'
The row as a whole has a Semantics container with excludeSemantics: false so screen readers traverse individual dots
Passing totalSteps > 5 triggers a CognitiveLoadRuleEngine assertion in debug mode and throws AssertionError
Passing currentStep < 1 or currentStep > totalSteps throws AssertionError
All dot sizes and spacing use design token values (no hardcoded pixel values)
Active dot colour meets WCAG 2.2 AA contrast ratio ≥ 4.5:1 against the page background
Widget is fully covered by golden tests for all 3 dot states
Widget renders correctly at font scale 2.0x (no overflow, no clipping)

Technical Requirements

frameworks
Flutter
data models
ScreenConfig (for CognitiveLoadRuleEngine validation)
performance requirements
Widget build completes in a single frame — no async operations
No unnecessary rebuilds: widget should be const-constructable when step data is fixed
ui components
WizardProgressIndicator
StepDot (private)
Semantics wrappers

Execution Context

Execution Tier
Tier 2

Tier 2 - 518 tasks

Can start after Tier 1 completes

Implementation Notes

Build as a StatelessWidget with const constructor. Use Row of StepDot widgets separated by thin connector lines (use Container with fixed height). StepDot state is derived from comparing index to currentStep — no internal state needed. Apply design tokens via Theme.of(context) extension or a DesignTokens static class — never hardcode hex colours or pixel sizes.

The Semantics label for the full row should NOT use a live region — screen readers should navigate dots individually. Use debugCheckHasFlutterMediaQuery in tests to ensure MediaQuery is available for font scale tests. For the connector line between dots, use a thin horizontal Divider-like Container (height: 2, colour: design token borderSubtle) — hide it from semantics with ExcludeSemantics.

Testing Requirements

Widget tests with flutter_test. Golden tests for: 1-step wizard (only active), 3-step wizard at step 1 (1 active, 2 upcoming), 3-step wizard at step 2 (1 completed, 1 active, 1 upcoming), 3-step wizard at step 3 (2 completed, 1 active), 5-step wizard at step 5 (max allowed). Test semantics tree with tester.getSemantics() — verify each dot has correct label. Test font scale 2.0x renders without overflow.

Test AssertionError for totalSteps = 6. Test AssertionError for currentStep = 0 and currentStep > totalSteps. No integration or e2e tests needed.

Component
Wizard Progress Indicator
ui low
Epic Risks (4)
high impact medium prob technical

The error message registry and help content registry both depend on bundled JSON assets loaded at startup. If asset loading fails silently (e.g. malformed JSON, missing pubspec asset declaration), the entire plain-language layer falls back to empty strings or raw error codes, breaking the accessibility guarantee app-wide.

Mitigation & Contingency

Mitigation: Implement eager validation of both assets during app initialisation with an assertion failure in debug mode and a structured error log in release mode. Add integration tests that verify asset loading in the Flutter test harness on every CI run.

Contingency: Ship a hardcoded minimum-viable fallback message set directly in Dart code so the app always has at least a safe generic message, preventing a blank or code-only error surface.

medium impact medium prob dependency

The AccessibilityDesignTokenEnforcer relies on dart_code_metrics custom lint rules. If the lint toolchain is not already configured in the project's CI pipeline, integrating a new linting plugin may cause unexpected build failures or require significant CI configuration work beyond the estimated scope.

Mitigation & Contingency

Mitigation: Audit the existing dart_code_metrics configuration in the project before starting implementation. Scope the lint rules to a separate Dart package that can be integrated incrementally, starting with the most critical rule (hard-coded colors) and adding others in subsequent iterations.

Contingency: Fall back to Flutter test-level assertions (using the cognitive-accessibility-audit utility) to catch violations in CI if the lint plugin integration is delayed, preserving enforcement coverage without blocking the epic.

medium impact low prob technical

WizardDraftRepository must choose between shared_preferences and Hive for local persistence. Choosing the wrong store for the data volume (e.g. shared_preferences for complex nested wizard state) can lead to serialisation bugs or performance degradation, particularly on lower-end Android devices used by some NHF members.

Mitigation & Contingency

Mitigation: Define a clean repository interface first and implement shared_preferences as the initial backend. Profile serialisation round-trip time with a realistic wizard state payload (≈10 fields) before committing to either store.

Contingency: Swap the persistence backend behind the repository interface without touching wizard UI code, which is possible precisely because the repository abstraction isolates the storage detail.

medium impact high prob scope

The AccessibilityDesignTokenEnforcer scope could expand significantly if a large portion of existing widgets use hard-coded values. Discovering widespread violations during this epic would force either a major refactor or a decision to exclude legacy components, potentially reducing the enforcer's coverage and value.

Mitigation & Contingency

Mitigation: Run a preliminary audit of existing widgets using a simple grep for hard-coded hex colors and raw pixel values before implementation begins. Use the results to set a realistic remediation boundary for this epic and log all out-of-scope violations as tracked tech-debt items.

Contingency: Scope the enforcer to new and modified components only (via file-path filters in dart_code_metrics config), shipping a partial but immediately valuable coverage rather than blocking the epic on full-codebase remediation.