Sensitive Field Widget
Component Detail
User Interface
high complexity
mobile
2
Dependencies
1
Dependents
5
Entities
0
Integrations
Description
A wrapper widget that intercepts Flutter's accessibility focus and speak events on fields marked as sensitive. When a screen reader (VoiceOver/TalkBack) focuses a sensitive field, the widget pauses automatic readout and displays an interstitial confirmation dialog asking the user to verify they are in a private environment before content is spoken aloud.
sensitive-field-widget
Responsibilities
- Intercept SemanticsAction focus/speak events on wrapped child widgets
- Display accessible interstitial confirmation dialog above the current screen
- Announce generic placeholder text when readout is declined
- Resume normal readout behaviour when user confirms private environment
- Read sensitivity flags from the data model layer at render time
Interfaces
SensitiveFieldWidget({required Widget child, required String fieldId})
buildConfirmationDialog(BuildContext context)
onAccessibilityFocus(SemanticsAction action)
announceGenericPlaceholder(String placeholderText)
checkSensitivityFlag(String fieldId)
isSensitive(String fieldId)
Relationships
Dependencies (2)
Components this component depends on
Sub-Components (1)
Readout Confirmation Dialog
component
medium
An accessible modal dialog rendered above the current screen with its own semantic label. Prompts the user to confirm they are in a private environment before sensitive data is read aloud. Fully operable via screen reader and keyboard navigation.
- Present confirm/dismiss actions with clear accessible labels
- Trap focus within dialog for screen reader users
- Return confirmation result to parent widget
Related Data Entities (5)
Data entities managed by this component