Data Layer low complexity Shared Component mobile
0
Dependencies
2
Dependents
3
Entities
0
Integrations

Description

Defines and persists the list of form fields throughout the app that are designated as containing sensitive personal data. Each field entry includes the field identifier, display label used in the warning dialog, and the screen/route context. This configuration is read at build time by the SensitiveFieldPrivacyGuard.

Feature: Screen Reader Support

sensitive-field-configuration

Summaries

The Sensitive Field Configuration component directly supports the organization's legal compliance obligations around personal data protection. By centralizing the registry of form fields that contain sensitive personal information, the app can consistently warn users before their data is read aloud by screen readers, reducing exposure to inadvertent privacy breaches in public settings. This shared component eliminates the risk of inconsistent privacy handling across different app screens, which could otherwise lead to regulatory penalties, reputational damage, or user trust erosion. Its runtime configurability means legal or product teams can designate new fields as sensitive without waiting for a full app release cycle, significantly reducing time-to-compliance when new requirements emerge and lowering the cost of responding to data privacy audits or regulatory changes.

This is a shared, low-complexity component with no external dependencies, making it a good candidate for early delivery as a foundational piece that unblocks the SensitiveFieldPrivacyGuard and related privacy features. The registry-style API is well-scoped and its persistence via local storage is straightforward to implement and test. Key scheduling consideration: the interface contract (isSensitive, getFieldLabel, registerField) must be finalised before downstream teams wire up the privacy guard, so plan a brief design review early in the sprint. Testing effort is minimal given low complexity, but integration verification with the privacy guard is essential.

Runtime update support means QA should verify that changes to the field registry propagate correctly without requiring an app restart, which adds a small but discrete test case surface.

Sensitive Field Configuration acts as a build-time and runtime registry consumed by SensitiveFieldPrivacyGuard to determine which form fields require a privacy warning before screen reader announcement. It exposes a clean lookup API (isSensitive, getFieldLabel) alongside mutation methods (registerField, unregisterField) and persistence hooks (loadFromStorage, saveToStorage) that integrate with the shared local storage layer. As a shared component used across multiple features, changes to its interface carry broad impact — treat the public API as stable once shipped. The routeContext field on each entry enables screen-aware behaviour, so ensure consistent route naming conventions are enforced at registration time.

Persistence serialization should handle schema versioning to avoid breaking existing device state on app updates. No external dependencies keeps the component lightweight and independently testable via pure unit tests.

Responsibilities

  • Store the registry of sensitive field IDs with labels and context
  • Expose a lookup API for checking if a given field is sensitive
  • Support runtime updates to the sensitive field list without app rebuild
  • Persist the configuration in local storage for offline availability

Interfaces

isSensitive(fieldId)
getFieldLabel(fieldId)
registerField(fieldId, label, routeContext)
unregisterField(fieldId)
getAllSensitiveFields()
loadFromStorage()
saveToStorage()

Relationships

Dependents (2)

Components that depend on this component

API Contract

View full contract →
REST /api/v1/sensitive-fields 6 endpoints
GET /api/v1/sensitive-fields
GET /api/v1/sensitive-fields/:id
POST /api/v1/sensitive-fields
PUT /api/v1/sensitive-fields/:id
DELETE /api/v1/sensitive-fields/:id
GET /api/v1/sensitive-fields/:id/sensitivity