SemanticLabelHelper
Component Detail
Service Layer
medium complexity
Shared Component
mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Provides utilities for generating and attaching accessible labels, roles, and hints to UI elements for VoiceOver and TalkBack. It resolves the correct label string for dynamic content and ensures every interactive element has a non-empty, human-readable announcement. It also supplies Norwegian-language label templates required by the app's UAT scripts.
semantic-label-helper
Sources & reasoning
Lines 28 and 30 declare WCAG 2.2 AA a hard MVP requirement with no exceptions and no deferrals across all organizations. Lines 31-38 enumerate specific sub-requirements (screen reader, contrast, touch targets, keyboard, drag alternatives). Blueprint marks this feature [MVP]. Source doc phase matrix (§4) lists WCAG as Fase 1, confirming MVP target_release.
-
docs/source/likeperson.md · line 28Appen 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å.
Responsibilities
- Generate accessible labels for interactive elements from content or explicit overrides
- Supply role and trait annotations compatible with iOS VoiceOver and Android TalkBack
- Provide hint strings describing the outcome of activating a control
- Support Norwegian locale label templates for UAT compliance verification
- Validate that no element exposes an empty or numeric-only accessible label
Interfaces
buildLabel(content: string, override?: string): AccessibleLabel
buildHint(action: ActionDescriptor): string
applySemanticProps(element: UIElement, label: AccessibleLabel): void
validateLabel(label: AccessibleLabel): ValidationResult
getLocalisedTemplate(key: string, locale: Locale): string