compose-quality

Configure Jetpack Compose accessibility semantics and stable UI test selectors.

1|1|Updated May 23, 2026
One-click install
npx skills add https://github.com/santimattius/performance-compose-skills --skill compose-quality
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-quality
Source: https://github.com/santimattius/performance-compose-skills/tree/main/skills/compose-quality
Command: npx skills add https://github.com/santimattius/performance-compose-skills --skill compose-quality

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you deliver Jetpack Compose UIs that are accessible to TalkBack/Switch Access users and reliable to verify with Compose UI tests and screenshot testing.

Core Features & Use Cases

  • Accessibility semantics that match the user experience: apply mergeDescendants, clearAndSetSemantics, hideFromAccessibility, traversalIndex/isTraversalGroup, liveRegion, customActions, and roles/state descriptions to control what assistive technologies (and tests) can “see.”
  • Deterministic UI testing on the right tree: choose stable selectors (contentDescription/testTag over text when possible) and correctly use merged vs unmerged semantics (useUnmergedTree) to avoid flaky assertions.
  • Screenshot testing guidance with safe defaults: pick and configure screenshot test approaches (with warnings for alpha tooling) so visual regression is maintainable.

Quick Start

Use compose-quality when you are adding accessibility semantics to a custom component or writing Compose UI tests for an interaction that must be discoverable (including gesture-only actions like swipe-to-dismiss) and when you need stable selectors and correct assertions against the merged semantics surface.

Frequently Asked Questions about compose-quality

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make Jetpack Compose UI elements discoverable to TalkBack?

Expose gesture-only interactions in Jetpack Compose to assistive technologies by defining customActions in semantics. This allows TalkBack users to access actions like swipe-to-dismiss through the accessibility menu instead of relying solely on touch gestures.

Why are my Compose UI tests flaky when using text matchers?

Compose UI tests become flaky when using text matchers because merged and unmerged semantics trees can cause mismatches. Prefer stable selectors like contentDescription and testTag over brittle text matching, and correctly configure useUnmergedTree to avoid assertion failures.

When should I use mergeDescendants versus clearAndSetSemantics in Compose?

Use mergeDescendants in Compose when you need to group child semantics into a single accessibility node, and use clearAndSetSemantics to completely replace the inherited semantics. Choosing the wrong modifier creates a mismatch between what users hear and what tests assert.

What is the best way to configure screenshot testing for Jetpack Compose?

The best way to configure screenshot testing for Jetpack Compose is to select approaches with safe defaults and maintainable visual regression checks. Be aware that some alpha tooling may introduce instability, so choose established configurations to ensure deterministic results.

Does Compose semantics traversalIndex affect Switch Access navigation?

Yes, traversalIndex and isTraversalGroup in Compose semantics directly affect Switch Access and TalkBack navigation order. Applying these modifiers lets you control the traversal sequence of accessibility nodes, ensuring users navigate interactive elements in the intended order.