I have essentially `Button { Text(someText) }` Do...
# compose
c
I have essentially
Button { Text(someText) }
Do I need to do anything in compose to make this accessible? Or by virtue of it being a button that contains a text, it should work correctly? I can't test with talkback at the moment, so I'm just trying to see if adding a contentDescription via semantics modifier is needed in this case?
e
https://support.google.com/accessibility/android/answer/7158690 > • In certain cases, content labels shouldn’t be added: > ◦ Text rendered in
Text
, or other composables that contain
Text
, is automatically provided to accessibility services. if you set
Modifier.semantics { contentDescription }
then that will be used instead of the children
2
z
you shouldn't need content description for this case though, this is the primary way buttons were designed to be used, it should be accessible automatically
that said, if you want to customize the a11y experience, feel free
c
thanks for the link @ephemient! being able to point to docs in this case is perf. thanks for the sanity check @Zach Klippenstein (he/him) [MOD] 😍 glad i was thinking correctly that a11y should be here by default basically.