DEV Community

Discussion on: Aria-live in JavaScript Frameworks

Collapse
 
steady5063 profile image
Mark Steadman

Hey There!

Great question. If you notice in the component there is setText() and clearText() anytime this component is called, or the props are added it will clear the live region that is added to the page, and then add it. So it doesn't actually append it is completely removing it from the live region and replacing it, which does work.

Collapse
 
grahamthedev profile image
GrahamTheDev

Doh 🤦‍♂️! How did I miss the clearText bit...I am going to blame reading it on a mobile over my inability to read code....it would be a lie but it makes me look less stupid 😜😂😂

Glad to know I am not doing it wrong though! Did you look at the page I linked (which I am now going to read to check it doesn’t have a disclaimer saying “support is patchy for this implementation” seeing as I am not doing well reading things properly!)

Once again great article and thanks for pointing out my goof! ❤️