Thread
#compose
    d

    deactivateduser

    2 years ago
    Hey, I see that Semantic public API documentation is still in the works (https://issuetracker.google.com/issues/138173117)? I am wondering how to set accessibility label onto a view (or if I got the terminology right - a node on the semantic tree?)
    I tried guessing:
    Semantics(container = true, explicitChildNodes = true, properties = {
        accessibilityLabel = "Access label"
        accessibilityValue = "Access value"
    }) {
        Text("Text here")
        Text("Text there")
    }
    r

    Ryan Mentley

    2 years ago
    That's not quite right, you only want to wrap a single component with Semantics
    If the two Texts are part of a larger component, you'd want to wrap that
    That said, it's not bridged over to the Android platform accessibility framework yet, so right now you can only exercise it through tests
    (also the publicly released version doesn't have the merging behaviors we've discussed - that'll be in soon)
    d

    deactivateduser

    2 years ago
    Thank you Ryan 🙂