DEV Community

Discussion on: Does anyone know how to enable a screen reader to announce to a user when a button has been clicked? or removed?

Collapse
 
mpuckett profile image
Michael Puckett • Edited

Hi, you can set up a separate live region div that is visually hidden, then dynamically add “Removed” to it. Check out the note in the yellow box here: developer.mozilla.org/en-US/docs/W...

Collapse
 
jaysonrichqward profile image
Jayson Di Pietro • Edited

Thanks for the response Michael , I have tried adding aria-live with both 'assertive' and 'polite' I even tried wrapping the component in its own unique "" tag with only aria-live but nothing is being announced..

Collapse
 
mpuckett profile image
Michael Puckett

Looks like React Native has a special Accessibility API.

facebook.github.io/react-native/do...

There is one for Live Region but it’s Android only? You may have to dig a little deeper to see if there is an equivalent or workaround for iOS.