Accessibility value - Jetpack Compose
In Jetpack Compose, you can use the clearAndSetSemantics
to override existing semantics and set new properties.
// Override so label and value will be read out together
val label = "Text label"
val value = "Text value"
Text(
text = value,
modifier = Modifier.clearAndSetSemantics {
text = AnnotatedString("$label, $value")
}
)