critical priority low complexity frontend pending frontend specialist Tier 0

Acceptance Criteria

Label text (InputDecoration.labelText or floatingLabelStyle) achieves a contrast ratio of ≥4.5:1 against the field background in both light and dark theme tokens
Placeholder/hint text (hintStyle) achieves a contrast ratio of ≥3:1 against the field background
The focused border or outline achieves a contrast ratio of ≥3:1 against adjacent colours (WCAG 2.2 SC 1.4.11 Non-text Contrast)
Every AppTextField instance has a programmatic label association via InputDecoration.labelText or a wrapping Semantics widget — no label-less text fields exist
Error text colour achieves ≥4.5:1 contrast against the field background
All updated colour values are defined as named design tokens (e.g., AppColors.inputLabelDefault, AppColors.inputHintText) rather than inline hex literals
A contrast-safe-color-palette document (or inline comments in the design token file) records the old value, new value, and measured contrast ratio for each changed token
No visual regression on existing screens using AppTextField — verify with at least one golden test update per changed colour token
The audit covers both the email field and the password field in the login form

Technical Requirements

frameworks
Flutter
flutter_test
performance requirements
Token changes must not introduce any additional widget rebuilds
security requirements
No functional security changes — this task is purely visual and accessibility-focused
ui components
AppTextField
InputDecoration
TextStyle (labelStyle, hintStyle, floatingLabelStyle, errorStyle)
AppColors design token file
FocusedBorder / OutlineInputBorder

Execution Context

Execution Tier
Tier 0

Tier 0 - 440 tasks

Implementation Notes

Start with a colour audit spreadsheet or inline comments listing each current token value and its measured contrast ratio against the design background (#121212 dark / #FFFFFF light). Tools: use the WebAIM Contrast Checker or the Colour Contrast Analyser desktop app with the exact hex values from the design token file. Prioritise fixing label and error text first (both are ≥4.5:1 requirement) before placeholder (≥3:1). The focus indicator fix often only requires increasing focusedBorder width to 2px and ensuring the border colour token meets the non-text contrast threshold.

Blindeforbundet users rely heavily on screen readers and high-contrast modes, making this a critical accessibility requirement across all three organisations. Coordinate with the design token owner before changing colour values to ensure the palette update is reflected in Figma as well.

Testing Requirements

Widget tests: assert that AppTextField renders with a non-empty labelText or has a Semantics ancestor with a meaningful label. Use flutter_test's SemanticsController to verify each field has an accessible label in the semantics tree. Golden tests: update existing AppTextField golden snapshots after colour token changes to lock in the new accessible appearance. Manual verification step (documented in PR): run the app on a device with accessibility settings → Increase Contrast enabled and confirm fields remain legible.

Use an online contrast checker (e.g., WebAIM) or the Flutter accessibility_tools package to measure ratios during development.

Component
Login Form
ui medium
Epic Risks (3)
high impact medium prob scope

Automated accessibility checks (e.g., flutter_accessibility_service) may pass while manual VoiceOver/TalkBack testing reveals focus-order issues, missing semantic roles, or live region announcements that fire too early or not at all. Discovering these late risks delaying the MVP release.

Mitigation & Contingency

Mitigation: Conduct manual VoiceOver and TalkBack testing on physical devices at the end of every sprint, not only at release. Define accessibility acceptance criteria per component and include them in the DoD. Use Semantics widgets explicitly rather than relying on implicit semantics from Flutter's default widgets for all interactive elements.

Contingency: Maintain a prioritized accessibility bug backlog separate from the main backlog. If critical VoiceOver issues are found close to release, create an explicit accessibility hotfix sprint before TestFlight distribution to Blindeforbundet testers.

medium impact medium prob technical

Keyboard height varies significantly between iOS and Android, between device sizes (iPhone SE vs iPad), and with third-party keyboards. The KeyboardAwareLayout may not correctly adjust scroll offset in all combinations, causing input fields to remain hidden behind the keyboard on certain device/keyboard configurations.

Mitigation & Contingency

Mitigation: Test on a matrix of devices including iPhone SE (small viewport), a mid-size Android phone, and a tablet. Implement the layout using MediaQuery.viewInsets.bottom rather than a fixed padding value to correctly respond to any keyboard height. Include edge cases for floating keyboards on iPads.

Contingency: If device-specific issues are found after release, implement a bottom-padding fallback using BottomPadding inset and allow users to manually scroll. Log affected device/OS combinations for targeted fixes.

high impact low prob dependency

If the design token system's colour palette is updated without re-running contrast validation, form field labels, error messages, or placeholder text could fall below the WCAG 2.2 AA 4.5:1 ratio, causing a compliance regression.

Mitigation & Contingency

Mitigation: Integrate a contrast ratio validator (e.g., a CI lint step using the contrast-ratio-validator component) that checks all colour pairs used in the login form on every pull request. Document which token pairs are used for labels, errors, and backgrounds in the login form.

Contingency: If a contrast regression is detected post-merge, hot-patch the affected design token value. Do not ship a TestFlight build with known WCAG AA failures to Blindeforbundet testers.