android-accessibility-validator
Skill4 starsChanged 3 months agoMITView on GitHub
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.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-annotationsSkill
- android-compose-architecture-reviewSkill
- android-kotlin-api-design-reviewerSkill
- android-performance-profilerSkill
- flutter-accessibility-validatorSkill
- flutter-bug-investigationSkill
- flutter-code-reviewSkill
- flutter-design-architectureSkill
- flutter-feature-analysisSkill
- flutter-feature-implementationSkill
- flutter-performance-optimizerSkill
- ios-accessibility-validatorSkill
- ios-performance-profilerSkill
- ios-swift-api-design-reviewerSkill
- ios-swiftui-architecture-reviewSkill
- shared-bug-investigationSkill
- shared-perf-comparison-videoSkill
- shared-product-motion-videoSkill
- shared-task-workflowSkill
The file
Files
Accessibility Validator (Android)
Checklist
TalkBack
- Interactive elements have
contentDescriptionvia semantics - Decorative elements:
Modifier.semantics { invisibleToUser() } - Related elements:
Modifier.semantics(mergeDescendants = true) - contentDescription is localized
- Use
Role(e.g.,Role.Button,Role.Switch,Role.Checkbox) viasemantics { role = Role.Button } - Provide
stateDescriptionfor toggles/switches (e.g., "On", "Checked") - Mark headings with
semantics { heading() } - Use
onClickLabelfor custom action descriptions - Control traversal order with
isTraversalGroupandtraversalIndexwhen default order is insufficient - Override defaults with
clearAndSetSemantics { ... }for complex custom components
Dynamic Text
- Use
spfor text sizes, notdp - Use
MaterialTheme.typographyscales - Layout adapts to large text sizes
- Support pinch-to-zoom scalable content with
Modifier.transformable+ state updates where appropriate
Color Contrast
- Text: 4.5:1 (normal), 3:1 (large 18sp+)
- Use Material Theme semantic colors
- Color not sole indicator
Touch Targets
- Minimum 48dp
- Use
Modifier.minimumInteractiveComponentSize()
Testing
- Manual testing with TalkBack enabled
- Automated checks via
enableAccessibilityChecks()in Compose tests
Quick Fixes
| Issue | Fix |
| No contentDescription | Modifier.semantics { contentDescription = "desc" } |
| Decorative | Modifier.semantics { invisibleToUser() } |
| Group | Modifier.semantics(mergeDescendants = true) |
| Small target | Modifier.size(48.dp) |
| Fixed font | Use MaterialTheme.typography.bodyLarge |
| Missing role or state | Modifier.semantics { role = Role.Switch; stateDescription = "On" } |
| Wrong traversal order | Modifier.semantics { isTraversalGroup = true; traversalIndex = 1 } |
Severity
- 🔴 Critical: Blocks accessibility
- 🟡 Moderate: Reduces usability
- 🟢 Minor: Enhancement
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

