Sensitive Field Warning Dialog
Component Detail
Description
An OS-level alert dialog that fires before a screen reader vocalises a field flagged as containing sensitive personal data (e.g., name, address, diagnosis). The dialog asks the user to confirm they are in a private setting before allowing the screen reader to proceed. Integrates with Flutter's SemanticsService.
sensitive-field-warning-dialog
Summaries
Healthcare and personal-data applications face strict regulatory requirements around information disclosure, and the Sensitive Field Warning Dialog directly addresses the risk of inadvertent exposure of protected health information in public environments. When a user with a screen reader enabled approaches a field containing a name, address, or medical diagnosis, the dialog intercepts and asks the user to confirm they are in a private setting before the data is read aloud. This proactive privacy control reduces liability under HIPAA, GDPR, and equivalent data protection frameworks, demonstrates a genuine commitment to user dignity and privacy, and can be cited as a concrete compliance measure during regulatory audits. It is a relatively unique feature that meaningfully differentiates the product in regulated markets where competitors often overlook audio privacy risks entirely.
This is the highest-complexity component in the accessibility layer and carries real project scheduling risk due to its two hard dependencies: `sensitive-field-configuration` and `screen-reader-detection-service` must both be complete and stable before integration testing can begin. The dialog itself requires coordination between the mobile engineering team and the product/legal teams to agree on exact field classifications and warning copy. Session-suppression logic (`setSuppressForSession`) requires careful state lifecycle management across app backgrounding and foreground transitions. Audit logging adds a cross-cutting concern that touches the data persistence layer.
Allocate at least two sprints for implementation plus a dedicated accessibility QA pass covering VoiceOver on iOS and TalkBack on Android, including edge cases like mid-session app restarts and screen rotation during dialog display.
The Sensitive Field Warning Dialog integrates with Flutter's `SemanticsService` by intercepting focus events on widgets annotated with a sensitive-field flag sourced from `sensitive-field-configuration`. It uses `screen-reader-detection-service` to gate activation — the dialog is only presented when an assistive technology is active. Internally, it maintains a `_sessionSuppressedFields` `Set
`onUserConfirmed` and `onUserDismissed` expose callbacks consumed by the calling widget to either allow or block semantics propagation. Audit events are emitted via a structured logging interface to `accessibility_settings` data model. The primary maintenance challenge is keeping up with Flutter Semantics API changes and ensuring correct behavior across OS-level accessibility setting toggles.
Responsibilities
- Intercept screen reader focus on fields marked as sensitive
- Present a configurable OS-style alert before vocalization
- Allow the user to dismiss or proceed, suppressing re-alerts per session
- Log warning events for accessibility audit trails
Interfaces
showSensitiveFieldWarning(fieldLabel)
setSuppressForSession(bool)
onUserConfirmed(callback)
onUserDismissed(callback)
resetSessionSuppression()
Relationships
Dependencies (2)
Components this component depends on
Related Data Entities (3)
Data entities managed by this component