Receive Audio Warning Before Screen Reader Reads Sensitive Personal Data
Sensitive fields — including encrypted assignment details, contact personal identification numbers, epikrise content, medical information, and home addresses — must be wrapped with a SensitiveSemantics component. When the screen reader focus reaches one of these fields, the system triggers a platform TTS warning (e.g., 'Warning: sensitive personal information follows. Ensure you are in a private location.') before delegating to the standard screen reader announcement. The warning text must be configurable per user via their accessibility preferences. The warning must occur on every focus event for sensitive fields, not just the first time. Users can configure whether the warning plays as audio only, vibration only, or both.
User Story
Acceptance Criteria
- Given VoiceOver is enabled and an assignment detail screen is open, when focus moves to an encrypted personal data field, then a TTS warning plays before the field content is read aloud
- Given a user has configured a custom warning message in accessibility settings, when a sensitive field is focused, then the custom warning text is used instead of the default
- Given a coordinator views a contact's personal identification number, when VoiceOver focuses that field, then the audio warning precedes the value announcement every time focus lands on it
- Given a user has disabled audio warnings but enabled haptic warnings, when a sensitive field is focused, then a vibration pattern plays but no audio warning precedes the reading
- Given sensitive field warnings are enabled, when the app is used in a noisy environment, then the warning volume respects the device's media volume level and is clearly audible at normal volume settings
- Given a sensitive field is inside a scrollable list, when that field scrolls into focus via swipe navigation, then the warning fires consistently before reading the field value
Business Value
Privacy concerns around sensitive personal data being read aloud in public settings were explicitly raised in stakeholder workshops, particularly for Norges Blindeforbund where peer mentors regularly receive epikrise summaries and personal contact details. This feature directly addresses a concrete privacy risk and demonstrates ethical data handling, which is essential for maintaining trust with both users and the individuals they serve. It also reduces liability for partner organizations in case of unintentional data disclosure.