Accessibility label - Jetpack Compose

In Jetpack Compose, you can use the contentDescription or text properties to set an accessibility label. ContentDescription is used for more visual elements, like icons and images. Text is used for text elements.

You can pass any kind of AnnotatedString for greater control over pronunciation.

// set contentDescription
Box(modifier = Modifier.semantics {
    contentDescription = "Appt"
}) {
    // Box content...
}

// set text
Box(modifier = Modifier.semantics {
    text = AnnotatedString("Appt")
}) {
    // Box content...
}