Android Compose set header level for accessibility - Stack Overflow

admin2025-04-18  2

In Jetpack Compose it's possible to indicate to TalkBack that your text is a header:

Text(
    text = "Heading text",
    modifier = Modifier.semantics {
        heading()
    }
)

Is it possible to also somehow indicate which level of header it is? Like you can have h1, h2, h3, etc...

iOS has AccessibilityHeadingLevel Does Android have an equivalent?

转载请注明原文地址:http://www.anycun.com/QandA/1744920211a89493.html