SensitiveFieldService
Component Detail
Description
A configurable registry service that maintains the list of form fields across the application that require privacy warnings before screen reader vocalization. It provides lookup and registration APIs consumed by SensitiveFieldWarningWidget to determine which fields are sensitive. The registry is configurable per screen context, supporting activity registration, contact detail, and assignment screens.
sensitive-field-service
Sources & reasoning
Line 37 names this requirement explicitly within the WCAG 2.2 AA accessibility section, attributed to NHF. That section (lines 26-38) is universally scoped to Fase 1 / MVP per lines 28 and 321. The sensitivity of assignment and contact data across all organizations - and the specific screen-reader user base in Blindeforbundet and NHF - makes this a high-priority privacy control warranting must_have at MVP.
-
docs/source/likeperson.md · line 37Varsling ved opplesning av sensitive felt (NHF).
Responsibilities
- Maintain a registry of field identifiers marked as sensitive across all relevant screens
- Provide a lookup API to check whether a given field ID requires a privacy warning
- Support runtime registration and deregistration of sensitive fields per screen context
- Load initial field registry from application configuration or a remote policy source
- Expose screen-scoped field lists for activity registration, contact detail, and assignment screens
Interfaces
isFieldSensitive(fieldId: string): boolean
registerField(fieldId: string, context: ScreenContext): void
deregisterField(fieldId: string, context: ScreenContext): void
getSensitiveFields(context: ScreenContext): string[]
loadRegistryFromConfig(config: SensitiveFieldConfig): void