Use Dictation Only in Designated Report Fields
Not all form fields should support dictation. Login fields, encrypted fields, and fields marked as restricted by the org configuration must never surface the microphone button. The dictation scope guard is responsible for evaluating each field's metadata — including sensitivity flags from org-field-config-loader and field type — and either showing or hiding the dictation trigger. This is especially important for Blindeforbundet, which transmits sensitive personal data including medical summaries, and for NHF, which has explicit requirements for notifying users before sensitive fields are read aloud.
User Story
Acceptance Criteria
- Given a field is of type 'password', 'encrypted', or is flagged as sensitive in org field config, When the report screen renders, Then no microphone button appears on that field
- Given a notes or description field is not restricted, When the report screen renders, Then the microphone button is visible and accessible with a minimum touch target of 44x44dp
- Given a coordinator attempts to dictate into a field dynamically added by org field config that is marked restricted, When the field renders, Then dictation is suppressed without any error being shown to the user
- Given the app is configured for an organisation that has all free-text fields unrestricted, When a peer mentor views the report, Then all free-text fields show the microphone button
- Given a screen reader user navigates to a dictation-enabled field, When they focus the microphone button, Then the accessible label reads 'Activate voice dictation for [field name]'
Business Value
GDPR compliance and partner trust depend on ensuring that no sensitive personal information — particularly medical data processed by Blindeforbundet and NHF — is routed through external speech recognition APIs. Restricting dictation to appropriate fields is a prerequisite for all partner organisations to enable this feature.
Components
- Dictation Scope Guard service
- Organisation Field Config Loader infrastructure
- Dictation Microphone Button ui
- Sensitive Field Privacy Guard service
- Sensitive Field Warning Dialog ui
- Sensitive Field Configuration data