Service Layer medium complexity mobilebackend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

A service that manages the generation, storage, and retrieval of accessibility semantic labels for all UI elements across the app. It provides a centralised label registry so VoiceOver and TalkBack receive consistent, context-aware descriptions regardless of the screen rendering them. The service also handles dynamic labels that change based on application state.

Feature: WCAG 2.2 AA Compliance

semantic-labelling-service

Sources & reasoning

Lines 28 and 30 declare WCAG 2.2 AA an absolute MVP requirement with no organizational exemptions, and line 321 repeats this explicitly under Fase 1 scope. The priority matrix (line 143) marks it MUST HAVE Phase 1 for all five organizations. This is the strongest mandate in the source doc, directly placing target_release at MVP with no ambiguity.

  • docs/source/likeperson.md · line 28
    Appen SKAL oppfylle WCAG 2.2 nivå AA som minimumskrav for alle skjermer og interaksjoner - fra dag én, for alle organisasjoner. Ingen organisasjon er unntatt eller utsatt til senere fase.
  • docs/source/likeperson.md · line 30
    WCAG 2.2 AA compliance er et absolutt krav for MVP - ikke noe som fikses etterpå.
  • docs/source/likeperson.md · line 321
    WCAG 2.2 AA compliance fra dag én - for alle organisasjoner, uten unntak

Responsibilities

  • Maintain a registry mapping component IDs to their accessibility labels, hints, and roles
  • Resolve dynamic labels by evaluating state context at runtime (e.g. "Remove item: Running shoes" vs a static "Remove")
  • Validate that every interactive element in the UI tree has a non-empty, meaningful label
  • Provide locale-aware label variants to support multilingual accessibility strings
  • Expose a bulk-label API for screens to register all element labels in a single call

Interfaces

getLabel(componentId: string, context?: LabelContext): AccessibilityLabel
registerLabels(screenId: string, labels: LabelMap): void
validateTree(tree: AccessibilityTree): LabelValidationResult
resolveDynamic(template: string, state: AppState): string
exportLabelRegistry(locale: string): LabelRegistry