I have a <div> tag where I’m updating the text every few milliseconds. Visually, I can see the text flashing by, which is good.
I want to make it an aria-live region so I can hear the text flashing by too, but I don’t want JAWS to read every text change. It'll get too bogged down.
So if I change the text 4 times by the time jaws finishes reading the first change, I want jaws to ignore the other 3 changes and to just say the next change (5th change), and so on. The missed 3 changes aren't important.
So I sort of have an aria-live region that's not really alive and it's not really dead. I need some kind of zombie middle ground.
I've tried various combinations of 'polite' and 'assertive' as well as aria-busy but nothing I've tried works.
Any ideas?
You can keep an empty <div aria-live="polite"></div> in the bottom of your document. Then inject a copy of the text you want to say at certain intervals into the aria-live div and then remove the text from the aria-live div a second or so later.
Be careful how you use it though. I could see examples of usage being announcing percentage of loading, or for a live population counter where you may want to announce it every couple of seconds or so.
For the most part though let the screen-reader do what it's meant to do. Sometimes we over-think a solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With