Member-only story
Part 3: Green Builds, Blind Spots: Testing Compose Accessibility Layer by Layer
Build for Everyone · Part 3 of 5
Not a Medium Member? “Read For Free”
Previously: Part 1 (“Raising the Floor”) set the baseline rules, and Part 2 (“From Five Stars to One Sentence”) built a custom rating control with real semantics. This part makes sure none of that quietly breaks.
TL;DR Accessibility regressions don’t crash, don’t change a single pixel, and don’t fail a single existing test. You catch them by testing the semantics tree, in five layers:
- Targeted assertions on the nodes that matter.
- Bulk assertions across groups of nodes.
- Touch-size checks.
- Automated audits with Google’s Accessibility Test Framework (ATF).
- A short manual TalkBack routine for everything machines can’t judge.
Each layer catches what the one below it can’t.
The regression nobody noticed
Here’s a migration that happens in real codebases. The design system team ships a new AppIconButton to replace scattered IconButton usages. It looks like this:
@Composable
fun AppIconButton(icon: ImageVector, onClick: () -> Unit, modifier: Modifier =…








