https://kotlinlang.org logo
#compose
Title
# compose
m

mattinger

01/14/2022, 3:18 PM
Does anyone know how to get the screen reader (ie. talkback) to recognize state change and re-announce something? I have an InputText field which has a validation state. It’s up to the caller how and when to validate (on button click, as you type, whatever). But when this state changes i would like that to be somehow announced.
r

rattleshirt

01/14/2022, 3:36 PM
m

mattinger

01/14/2022, 4:10 PM
@rattleshirt I’m not sure that will be helpful. What i’m asking for is to modify the description while the field is focused and have it read. I have zero issues with how the screen reader is announcing it when it gains focus. It’s the the transition of state while already focused that is my concern.
z

Zach Klippenstein (he/him) [MOD]

01/14/2022, 5:18 PM
I thought we detected changes in node properties and sent the appropriate events automatically. @Anastasia [G] does this sound like a bug?
a

Anastasia [G]

01/17/2022, 12:23 PM
We send the events but Talkback will not necessarily announce it, it has a complex set of rules when to announce what. There’s something called
liveRegion
. The typical use case for it is the Snackbar which we want to announce when it appears even though the accessibility focus is on some other node. Or MDC marks the errorView for input validation as well. But note that in general accessibility team asks to use this with caution as it can be quite disruptive for the user
👍🏻 1
m

mattinger

01/25/2022, 7:52 PM
@Zach Klippenstein (he/him) [MOD] @Anastasia [G] Still wondering about this.
z

Zach Klippenstein (he/him) [MOD]

01/26/2022, 2:35 AM
Did liveRegion not work for you?
2 Views