Skill Wiki v0.1.0
rule @android-compose/rule-semantic-tree-via-modifier-semantics

Semantic Tree Via Modifier Semantics

The Compose accessibility tree is what TalkBack and ui-test see. By default it mirrors the composable tree, but custom widgets, merged groupings, and dynamic state often need explicit shaping via `Modifier.…

Skill
@android-compose
Domain
android-compose
Version
0.1.0
Quality
4.0
Edges
2 out · 2 in
Tokens
165/369/390
$ prime install @android-compose/rule-semantic-tree-via-modifier-semantics

Projection

Always in _index.xml · the agent never has to ask for this.

SemanticTreeViaModifierSemantics [rule] v0.1.0

The Compose accessibility tree is what TalkBack and ui-test see. By default it mirrors the composable tree, but custom widgets, merged groupings, and dynamic state often need explicit shaping via Modifier.semantics { } and Modifier.clearAndSetSemantics { }. Set roles (Button, Switch, Heading), state (stateDescription, selected, toggleableState), labels (contentDescription, text), and relationships (liveRegion, error, traversalIndex). Do NOT control screen-reader output by hiding views with alpha(0f) or by cramming everything into one giant contentDescription.

Source

prime-system/examples/android-compose/primes/compiled/@android-compose/rule-semantic-tree-via-modifier-semantics/atom.yaml

Compiled at 2026-05-10