Configure and Persist Screen Reader Accessibility Preferences
The Accessibility Config Repository persists per-user accessibility preferences to the accessibility_preferences table in Supabase and maintains a local cache for offline access. The settings managed include: screen reader mode preference (VoiceOver/TalkBack/JAWS), sensitive field warning enabled/disabled, warning delivery mode (audio/haptic/both), custom warning message text, and any organization-level accessibility overrides applied by an admin. On app launch, preferences are loaded from the local cache immediately (no network round-trip blocking startup), then synchronized with the server in the background. Changes made while offline are queued and synced when connectivity is restored.
User Story
Acceptance Criteria
- Given a user has configured a custom sensitive field warning message, when the app is closed and reopened, then the custom warning message is active without requiring re-entry
- Given a user is in airplane mode, when the app launches, then accessibility preferences from the local cache are applied within 200ms of startup
- Given a user changes their warning delivery mode from audio to haptic while offline, when connectivity is restored, then the preference change is synced to the server without data loss
- Given an organization admin has set an organization-level accessibility override, when a user in that organization opens the app, then the override is applied alongside their personal preferences
- Given a user opens the accessibility settings screen, when they view their current preferences, then all saved values are displayed accurately reflecting the last saved state
- Given a new user with no saved preferences, when the app launches for the first time, then screen reader warnings default to enabled with the standard warning message
Business Value
Peer mentors use the app in the field — often in environments where network connectivity is unreliable — and cannot afford to have their accessibility setup fail or require manual reconfiguration before each session. Reliable offline persistence of accessibility preferences is essential for the day-to-day usability of the app for its most vulnerable users. This also reduces friction for users with screen readers, who may have complex configuration needs and should only need to set them up once.
Components
- Accessibility Config Repository data
- Semantic Label Service service