Accessibility Audit Service
Component Detail
Service Layer
high complexity
mobile
2
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Provides automated accessibility validation logic used both in CI and at runtime. Validates contrast ratios against WCAG 4.5:1 (text) and 3:1 (UI component) thresholds using design token values, verifies touch target sizes, and runs Flutter semantics tree assertions. Integrates with the CI pipeline to block builds that introduce accessibility regressions.
accessibility-audit-service
Responsibilities
- Validate color contrast ratios for all design token color pairs against WCAG thresholds
- Assert that all interactive Semantics nodes have non-empty labels in widget tests
- Check minimum touch target sizes in widget test suite via finder constraints
- Generate accessibility audit reports per screen for manual review milestones
- Expose utility methods for use in flutter_test semantics assertions
Interfaces
validateContrastRatio(Color foreground, Color background) -> ContrastResult
assertSemanticsLabels(WidgetTester tester) -> List<SemanticsViolation>
assertTouchTargetSizes(WidgetTester tester) -> List<TouchTargetViolation>
generateAuditReport(String screenName) -> AccessibilityAuditReport
runFullScreenAudit(WidgetTester tester, String screenName) -> AuditSummary
Relationships
Dependencies (2)
Components this component depends on
Dependents (1)
Components that depend on this component