guillemroca/agent-skills-android/android-accessibility
Claude Code and agent skill by guillemroca/agent-skills-android
- community
Checking that the SKILL.md file is still in the repository.
Use when building or reviewing Android UI for accessibility. Covers TalkBack, content descriptions, touch targets, Compose semantics, focus order, and Accessibility Scanner testing.
Install
npx vskill@latest install guillemroca/agent-skills-android/android-accessibilitySKILL.md
The same SKILL.md was published earlier as guillemroca/agent-skills-android/android-accessibility.
Android Accessibility
Overview
Accessibility is not optional — it's a requirement for reaching all users. This skill covers building accessible Android UIs with Jetpack Compose semantics, proper content descriptions, touch target sizing, TalkBack compatibility, and systematic testing with Accessibility Scanner.
When to Use
- Building new UI screens or components
- Reviewing existing UI for accessibility compliance
- Fixing accessibility issues flagged by Accessibility Scanner or users
- Before shipping any user-facing feature
Skip when: Working on non-UI code (repositories, use cases, networking).
Core Standards
| Requirement | Standard | |
|---|---|---|
| Touch targets | Minimum 48dp x 48dp | |
| Color contrast (text) | >= 4.5:1 (normal), >= 3:1 (large 18sp+) | |
| Color contrast (UI components) | >= 3:1 against adjacent colors | |
| Content descriptions | All meaningful visual elements | |
| Focus order | Logical reading order | |
| No color-only information | Additional indicators required |
Core Process
Step 1: Content Descriptions
- Every meaningful visual element needs a description:
- Description rules:
- Describe the action or meaning, not the visual appearance
- "Delete task" not "red trash can icon"
- "Search" not "magnifying glass"
- Use
nullfor purely decorative elements - Include dynamic content: "Profile photo of John" not just "profile photo"
Step 2: Touch Targets
- Enforce minimum 48dp touch targets:
Step 3: Compose Semantics
- Use semantics for rich accessibility information:
- Semantics rules:
mergeDescendants = truefor compound components (card with title + subtitle)heading()for section titles (enables TalkBack heading navigation)liveRegionfor content that updates dynamically (counters, status)stateDescriptionfor custom state (not just "checked/unchecked")Rolefor custom interactive elements
Step 4: Focus Order
- Ensure logical focus order:
Step 5: Color and Contrast
- Don't rely on color alone:
- Use Material theme colors — they're designed for contrast compliance:
onSurfaceonsurface— guaranteed contrastonPrimaryonprimary— guaranteed contrasterrorandonError— guaranteed contrast
Step 6: Testing
- TalkBack testing (manual):
- Enable TalkBack: Settings → Accessibility → TalkBack
- Swipe right to move to next element
- Verify announcements make sense without seeing the screen
- Check that all interactive elements are reachable
- Verify no elements are skipped or read in wrong order
- Accessibility Scanner (automated):
- Install from Play Store: "Accessibility Scanner" by Google
- Run on every screen before shipping
- Fixes: touch target size, contrast ratio, content descriptions
- `android layout` for scriptable accessibility assertions:
android layout --pretty returns JSON with content-desc, role, and bounds per node — turn it into automated scans you can run from a script or CI step.
```bash # Fail the build if any Button is missing content-desc android layout --pretty \
&& echo "FAIL: unlabeled button" && exit 1
# Flag touch targets smaller than 48dp (assuming density-converted bounds) android layout --pretty \
| jq '.nodes[] | select(.role=="Button") | {id: .["resource-id"], bounds}' \ |
|---|---|---|
| review_target_sizes.sh |
```
Use android layout --diff after an interaction to inspect only what changed — keeps assertions tight when verifying live regions, error toasts, or focus shifts. When layout returns nothing useful (WebView, animation), fall back to android screen capture --annotate -o screen.png and visually verify focus order. See ../../references/android-cli-reference.md.
No device needed for composables: android studio render-compose-preview --print-semantics <file> <composable> emits the accessibility semantics tree of a @Preview as JSON — assert on contentDescription, role, and heading semantics straight from the preview, before anything is installed (requires a running Android Studio with Gemini; see ../../references/android-cli-reference.md).
- Compose UI tests for accessibility:
Common Rationalizations
| Shortcut | Why It Fails | |
|---|---|---|
| "We'll add accessibility later" | Retrofitting is 5-10x harder than building accessible from the start. | |
| "Our users don't use TalkBack" | 15% of the world's population has a disability. You don't know your users. | |
| "ContentDescription is visual boilerplate" | It's the only way screen reader users interact with your app. | |
| "Material components handle accessibility" | Material provides a foundation. You still need content descriptions, focus order, and semantic grouping. | |
| "Touch targets look too big" | The visual element can be 24dp. The touch target must be 48dp. They're independent. |
Red Flags
- Images or icons without content descriptions
- Touch targets smaller than 48dp
- Color as the only differentiator
- Missing heading semantics on section titles
- No
mergeDescendantson compound components - Hardcoded colors that may not meet contrast ratios
- No TalkBack or Accessibility Scanner testing before release
contentDescription = ""(should benullfor decorative)
Verification
- [ ] All meaningful images/icons have descriptive
contentDescription - [ ] Decorative elements use
contentDescription = null - [ ] All touch targets >= 48dp x 48dp
- [ ] Color is never the only differentiator
- [ ] Section headings use
semantics { heading() } - [ ] Compound components use
mergeDescendants = true - [ ] Dynamic content uses
liveRegion - [ ] Focus order matches logical reading order
- [ ] TalkBack tested on all screens
- [ ] Accessibility Scanner reports zero critical issues
- [ ] Compose tests verify content descriptions exist
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/android-accessibility/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/guillemroca/agent-skills-android/android-accessibility)