androidx.compose.ui.node
SemanticsModifierNode
Interface · from org.jetbrains.compose.ui:ui:1.12.2
No hand-written docs yet.
A Modifier.Node that adds semantics key/value for use in testing, accessibility, and similar use cases.
interface SemanticsModifierNode : DelegatableNode
Is a
Properties
shouldClearDescendantSemantics
val shouldClearDescendantSemantics: Boolean
Clears the semantics of all the descendant nodes and sets new semantics.
shouldMergeDescendantSemantics
val shouldMergeDescendantSemantics: Boolean
Whether the semantic information provided by this node and its descendants should be treated as one logical entity. Most commonly set on screen-reader-focusable items such as buttons or form fields. In the merged semantics tree, all descendant nodes (except those themselves marked shouldMergeDescendantSemantics) will disappear from the tree, and their properties will get merged into the parent's configuration (using a merging algorithm that varies based on the type of property -- for example, text properties will get concatenated, separated by commas). In the unmerged semantics tree, the node is simply marked with SemanticsConfiguration.isMergingSemanticsOfDescendants.
isImportantForBoundsSince 1.9
val isImportantForBounds: Boolean
Whether this semantics modifier node should be taken into account when computing the layout boundaries of the corresponding SemanticsNode, which are used for accessibility and testing. By default, all semantics modifier nodes affect semantics bounds.
Functions
applySemantics
fun SemanticsPropertyReceiver.applySemantics()
Add semantics key/value pairs to the layout node, for use in testing, accessibility, etc.
Library docs
A Modifier.Node that adds semantics key/value for use in testing, accessibility, and similar
use cases.
This is the androidx.compose.ui.Modifier.Node equivalent of
androidx.compose.ui.semantics.SemanticsModifier