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

Description

Validates semantic coverage across all app screens during development and QA. Traverses the semantic tree to detect missing labels, empty hints, and interactive elements with no semantic role. Generates a report used by the team when auditing with VoiceOver and TalkBack on real devices.

Feature: Screen Reader Support

accessibility-audit-service

Summaries

The Accessibility Audit Service is the quality assurance backbone for the application's inclusive design commitments. It gives the development and QA team automated, structured visibility into where the app falls short of accessibility standards — before users encounter those gaps. By generating per-screen reports that flag missing labels, empty hints, and unlabelled interactive elements, it dramatically reduces the cost and time required for manual accessibility reviews. This translates directly into faster release cycles with higher confidence, reduced rework after audit failures, and a defensible compliance posture if the product is subject to accessibility procurement requirements or legal challenge.

The debug overlay mode enables rapid iteration during development, shortening the feedback loop for engineers fixing semantic gaps.

Accessibility Audit Service is a high-complexity, development and QA phase tool that should be integrated into the CI pipeline as early as possible to catch regressions before they accumulate. It depends on screen-reader-detection-service for platform context and traverses the Flutter semantic tree, meaning it must be updated whenever new screen routes or dynamic widget types are added. Schedule recurring audit runs as part of sprint QA ceremonies rather than treating accessibility as a one-time gate. The auditFullApp() function requires a full app traversal and may have significant runtime on larger route graphs — benchmark its execution time and consider running it nightly rather than on every PR.

Assign ownership of report triage to a specific team member to prevent audit findings from being deprioritized.

Accessibility Audit Service uses Flutter's SemanticsNode tree, accessed via SemanticsBinding.instance.ensureSemantics() and traversed recursively from the root SemanticsNode. auditScreen() accepts a routeName, resolves the corresponding widget subtree via the Navigator's route registry, and walks its semantic subtree checking each node for: non-empty label or value (for text and image nodes), a defined SemanticsRole for interactive elements (buttons, text fields, checkboxes), and non-empty hint strings for complex actions. getUnlabelledElements() and getEmptyHintElements() return filtered lists of SemanticsNode references for downstream report formatting. generateReport() serializes findings to a structured JSON map keyed by routeName.

enableDebugOverlay() activates a CustomPainter layer that draws bounding-box overlays around each SemanticsNode, colour-coded by compliance status, using an OverlayEntry injected at the root navigator level.

Responsibilities

  • Traverse the Flutter semantic tree and detect gaps in coverage
  • Flag interactive elements with missing labels or roles
  • Generate a structured audit report per screen
  • Provide a debug overlay mode for visual semantic boundary display

Interfaces

auditScreen(routeName)
auditFullApp()
generateReport()
enableDebugOverlay(bool)
getUnlabelledElements()
getEmptyHintElements()

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component

API Contract

View full contract →
REST /api/v1/accessibility-audits 6 endpoints
GET /api/v1/accessibility-audits
GET /api/v1/accessibility-audits/:id
POST /api/v1/accessibility-audits
PUT /api/v1/accessibility-audits/:id
DELETE /api/v1/accessibility-audits/:id
GET /api/v1/accessibility-audits/:id/report