Service Layer low complexity mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Provides WCAG 2.2 AA-compliant semantic labels, announcements, and focus management for the expense type picker. Ensures screen readers receive meaningful announcements when options become disabled due to mutual exclusion and that the disabled state is communicated accessibly.

Feature: Expense Type Selection with Mutual Exclusion

expense-type-accessibility-service

Summaries

The Expense Type Accessibility Service ensures the expense registration feature is legally and ethically compliant with WCAG 2.2 AA accessibility standards, making the application usable by employees with visual impairments or motor disabilities. Accessibility compliance is increasingly a legal requirement in enterprise software procurement and a stated requirement in many corporate vendor assessments. Shipping an inaccessible expense tool risks exclusion from enterprise contracts and exposes the organisation to discrimination claims. Investing in this dedicated service also improves the experience for all users through clearer labelling and predictable focus behaviour, particularly on small mobile screens.

Low complexity component with no external dependencies, well-suited for parallel development alongside the UI widget. The key delivery dependency is finalised copy for semantic labels and exclusion announcements, which requires input from UX writers and sign-off from an accessibility specialist. Plan for at least one accessibility audit session with assistive technology (VoiceOver on iOS, TalkBack on Android) before release — this is a testing requirement that is frequently underestimated. Budget time for at least one iteration cycle following the audit.

Colour contrast validation for selected and disabled states must be completed against the design system tokens. Late design changes to colours or states will require re-validation.

Pure Dart service with no dependencies. getSemanticLabel(ExpenseType, bool isSelected, bool isDisabled) produces fully contextual strings for Semantics widgets, combining type name, selection state, and disabled-with-reason text. getExclusionAnnouncement produces a single polite-mode announcement string listing all newly disabled types to be dispatched via SemanticsService.announce() on selection change. getFocusOrder returns an ordered List for explicit traversal management within the picker.

Colour contrast validation should be implemented as a set of unit assertions against the design token hex values. All announcement strings must be internationalisation-ready — avoid hardcoded English. Integrate with Flutter's Semantics tree via the picker widget's build method, not directly from this service.

Responsibilities

  • Generate semantic labels for each expense type option in all states
  • Produce screen reader announcements on selection change and exclusion trigger
  • Manage focus order within the picker widget
  • Validate colour contrast for selected and disabled states

Interfaces

getSemanticLabel(ExpenseType type, bool isSelected, bool isDisabled) → String
getExclusionAnnouncement(Set<ExpenseType> disabled) → String
getFocusOrder() → List<FocusNode>

Related Data Entities (1)

Data entities managed by this component

API Contract

View full contract →
REST /api/v1/accessibility/expense-types 5 endpoints
GET /api/v1/accessibility/expense-types List semantic accessibility labels for all expense types
GET /api/v1/accessibility/expense-types/:id Get semantic accessibility label for a specific expense type
POST /api/v1/accessibility/expense-types Create a custom accessibility label override for an expense type
PUT /api/v1/accessibility/expense-types/:id Update an accessibility label override
DELETE /api/v1/accessibility/expense-types/:id Delete a custom accessibility label override