Android Accessibility Skill
Purpose
WCAG 2.1 AA accessibility rules for Android development. Covers both Jetpack Compose (rustX/communities modules) and traditional Views/XML (epostSdk/app modules). Includes TalkBack support, content descriptions, touch targets, focus semantics, heading structure, color contrast, custom Views, RecyclerView, and AccessibilityDelegate patterns.
Aspect Files
| File |
Coverage |
references/android-content-descriptions.md |
Compose: contentDescription for images, icons, composables — meaningful vs decorative, live regions, custom actions |
references/android-touch-targets.md |
48×48dp minimum, MinimumTouchTargetSize, Box padding patterns |
references/android-focus-semantics.md |
Compose: mergeDescendants, stateDescription, traversalIndex, clearAndSetSemantics, toggleableState |
references/android-headings.md |
heading() semantic, hierarchy, TalkBack heading navigation |
references/android-contrast.md |
WCAG contrast ratios, MaterialTheme, dark mode, dynamic color, testing tools |
references/android-views-xml-a11y.md |
Views/XML: contentDescription, importantForAccessibility, labelFor, liveRegion, custom View onInitializeAccessibilityNodeInfo, RecyclerView/ViewHolder, AccessibilityDelegate |
Fix Templates
| Template ID |
Violation |
Fix |
add_content_description |
Image/Icon missing contentDescription (Compose) |
Add contentDescription = "..." to Image or Icon |
make_decorative |
Decorative image incorrectly announced (Compose) |
Set contentDescription = null on Image or Icon |
add_content_description_xml |
Image/Icon missing contentDescription (XML) |
Add android:contentDescription="..." to ImageView/ImageButton |
make_decorative_xml |
Decorative image announced (XML) |
Set android:importantForAccessibility="no" |
add_viewholder_description |
RecyclerView item missing accessible description |
Set holder.itemView.contentDescription in onBindViewHolder |
add_touch_target |
Tap target smaller than 48×48dp |
Wrap in Box with Modifier.sizeIn(minWidth = 48.dp, minHeight = 48.dp) |
add_heading_semantic |
Section title not marked as heading |
Add Modifier.semantics { heading() } |
add_state_description |
Custom toggle/state without state announcement |
Add Modifier.semantics { stateDescription = "..." } |
other_manual |
Complex semantic issue requiring human judgment |
Flag for manual review — no automated fix |
Key Compose Accessibility APIs
| API |
Purpose |
Example |
contentDescription |
Announce element to TalkBack |
Image(contentDescription = "Profile photo") |
Modifier.semantics { } |
Override or extend semantic properties |
Modifier.semantics { stateDescription = "Selected" } |
mergeDescendants = true |
Group child semantics into single node |
Groups icon + label into one TalkBack announcement |
stateDescription |
Describe current toggle/checkbox state |
"Checked" / "Unchecked" for custom controls |
heading() |
Mark text as section heading |
Enables TalkBack heading navigation |
clearAndSetSemantics { } |
Replace all child semantics |
Full control over composite composable announcements |
traversalIndex |
Custom TalkBack focus order |
semantics { traversalIndex = 0f } — lower = earlier |
Touch Target Minimum
All interactive composables (buttons, checkboxes, icon buttons, clickable rows) must meet the 48×48dp minimum touch target. Material3 enforces this by default for standard components. Custom composables require explicit sizing.
Related Documents
a11y — POUR framework, severity scoring, operating modes
ios-a11y — iOS equivalent (VoiceOver, UIKit, SwiftUI)
1---2name: android-a11y-23description: Use when Android accessibility issues arise — TalkBack, contentDescription, touch targets, focus order, contrast in Compose or Views/XML4user-invokable: false5metadata:6 source: https://skillmd.com/skills/majiayu000/android-a11y-27 keywords:8 - talkback9 - android-accessibility10 - content-description11 - touch-target12 agent-affinity:13 - epost-a11y-specialist14 - epost-implementer15 platforms:16 - android17 connections:18 extends: [a11y]19---2021# Android Accessibility Skill2223## Purpose2425WCAG 2.1 AA accessibility rules for Android development. Covers both **Jetpack Compose** (rustX/communities modules) and **traditional Views/XML** (epostSdk/app modules). Includes TalkBack support, content descriptions, touch targets, focus semantics, heading structure, color contrast, custom Views, RecyclerView, and AccessibilityDelegate patterns.2627## Aspect Files2829| File | Coverage |30|------|----------|31| `references/android-content-descriptions.md` | **Compose**: contentDescription for images, icons, composables — meaningful vs decorative, live regions, custom actions |32| `references/android-touch-targets.md` | 48×48dp minimum, MinimumTouchTargetSize, Box padding patterns |33| `references/android-focus-semantics.md` | **Compose**: mergeDescendants, stateDescription, traversalIndex, clearAndSetSemantics, toggleableState |34| `references/android-headings.md` | heading() semantic, hierarchy, TalkBack heading navigation |35| `references/android-contrast.md` | WCAG contrast ratios, MaterialTheme, dark mode, dynamic color, testing tools |36| `references/android-views-xml-a11y.md` | **Views/XML**: contentDescription, importantForAccessibility, labelFor, liveRegion, custom View onInitializeAccessibilityNodeInfo, RecyclerView/ViewHolder, AccessibilityDelegate |3738## Fix Templates3940| Template ID | Violation | Fix |41|-------------|-----------|-----|42| `add_content_description` | Image/Icon missing contentDescription (Compose) | Add `contentDescription = "..."` to Image or Icon |43| `make_decorative` | Decorative image incorrectly announced (Compose) | Set `contentDescription = null` on Image or Icon |44| `add_content_description_xml` | Image/Icon missing contentDescription (XML) | Add `android:contentDescription="..."` to ImageView/ImageButton |45| `make_decorative_xml` | Decorative image announced (XML) | Set `android:importantForAccessibility="no"` |46| `add_viewholder_description` | RecyclerView item missing accessible description | Set `holder.itemView.contentDescription` in `onBindViewHolder` |47| `add_touch_target` | Tap target smaller than 48×48dp | Wrap in Box with `Modifier.sizeIn(minWidth = 48.dp, minHeight = 48.dp)` |48| `add_heading_semantic` | Section title not marked as heading | Add `Modifier.semantics { heading() }` |49| `add_state_description` | Custom toggle/state without state announcement | Add `Modifier.semantics { stateDescription = "..." }` |50| `other_manual` | Complex semantic issue requiring human judgment | Flag for manual review — no automated fix |5152## Key Compose Accessibility APIs5354| API | Purpose | Example |55|-----|---------|---------|56| `contentDescription` | Announce element to TalkBack | `Image(contentDescription = "Profile photo")` |57| `Modifier.semantics { }` | Override or extend semantic properties | `Modifier.semantics { stateDescription = "Selected" }` |58| `mergeDescendants = true` | Group child semantics into single node | Groups icon + label into one TalkBack announcement |59| `stateDescription` | Describe current toggle/checkbox state | `"Checked"` / `"Unchecked"` for custom controls |60| `heading()` | Mark text as section heading | Enables TalkBack heading navigation |61| `clearAndSetSemantics { }` | Replace all child semantics | Full control over composite composable announcements |62| `traversalIndex` | Custom TalkBack focus order | `semantics { traversalIndex = 0f }` — lower = earlier |6364## Touch Target Minimum6566All interactive composables (buttons, checkboxes, icon buttons, clickable rows) must meet the **48×48dp minimum** touch target. Material3 enforces this by default for standard components. Custom composables require explicit sizing.6768## Related Documents6970- `a11y` — POUR framework, severity scoring, operating modes71- `ios-a11y` — iOS equivalent (VoiceOver, UIKit, SwiftUI)