flutter-accessibility-validator
Accessibility Skill
Semantic Labels
// Icons & buttons
Semantics(label: 'Settings', button: true, child: Icon(Icons.settings))
// Images (or ExcludeSemantics if decorative)
Semantics(label: 'Profile picture', image: true, child: Image.network(url))
// Interactive (prefer InkWell over GestureDetector)
Semantics(button: true, label: 'Open', child: InkWell(...))
Dynamic Announcements
import 'package:flutter/semantics.dart';
SemanticsService.announce('Button unlocked!', TextDirection.ltr);
Touch Targets & Forms
// Minimum 48x48 dp
IconButton(iconSize: 48, ...)
// Forms need labels
TextField(decoration: InputDecoration(
labelText: 'Email',
errorText: isValid ? null : 'Invalid',
))
Color Contrast
// Use ColorPalette (WCAG-compliant)
Text('Text', style: TextStyle(
color: ColorPalette.coloursBasicText.platformBrightnessColor(context),
))
Focus Management
FocusTraversalGroup(
policy: OrderedTraversalPolicy(),
child: Column(children: [
FocusTraversalOrder(order: NumericFocusOrder(1), child: TextField(...)),
FocusTraversalOrder(order: NumericFocusOrder(2), child: Button(...)),
]),
)
Testing
// Automated
await expectLater(tester, meetsGuideline(textContrastGuideline));
await expectLater(tester, meetsGuideline(androidTapTargetGuideline));
Checklist
- Semantic labels on interactive elements
- Touch targets ≥ 48x48 dp
- Contrast ≥ 4.5:1 (text), 3:1 (UI)
- Forms have labels + errors
- Dynamic changes announced
- Logical focus order
- Tested with VoiceOver + TalkBack
More from desquared/agents-rules-skills
shared-bug-investigation
Scientific method expert for systematic bug investigation and root cause analysis. Use when users report bugs, crashes, unexpected behavior, or debugging requests. Applies hypothesis-driven investigation, controlled experiments, and rigorous validation across any programming language or platform.
23android-performance-profiler
Identifies potential performance bottlenecks in Jetpack Compose code including expensive recompositions, unnecessary redraws, and memory issues. Use when code involves lists, animations, complex UI, or when the user asks about performance optimization.
19ios-swiftui-architecture-review
Analyze SwiftUI view hierarchies and suggest MVVM or other architectural improvements. Use when **reviewing existing SwiftUI code**, creating new SwiftUI components, analyzing view structure, or when the user asks about SwiftUI architecture patterns. Best for code review and refactoring guidance.
13android-compose-architecture-review
Analyze Jetpack Compose UI hierarchies and suggest MVVM/MVI or other architectural improvements. Use when reviewing existing Compose code, creating new Compose components, analyzing composable structure, or when the user asks about Compose architecture patterns. Best for code review and refactoring guidance.
13android-accessibility-validator
Checks and suggests accessibility improvements for Jetpack Compose and Android Views including TalkBack labels, dynamic text support, and color contrast. Use when creating or modifying UI components, screens, or when the user asks about accessibility.
12android-kotlin-api-design-reviewer
Review function and class interfaces for Kotlin Coding Conventions compliance. Use when creating public APIs, reusable components, library interfaces, or when the user asks for API design review or Kotlin naming conventions.
11