WebAIM - Web Accessibility In Mind

E-mail List Archives

Speaking text through screen reader on webpage?

for

From: Alex Hall
Date: Apr 27, 2016 7:29AM


Hello list,
I'm making an internal webpage for the place I work, and I'm the only
screen reader user. To make my life easier, I'd like to speak messages
through my screen reader as Ajax-driven events happen. I can't get this to
work, though. My div looks like this:

div id="announcement" style="display: none;" aria-live="assertive"
role="log" aria-relevant="additions" aria-atomic="true"></div

(I've removed the first and last symbols so this doesn't render in this
email.) I then use this in JS, having already included JQuery:

$("#announcement").empty();
$("#announcement").append("Test message.");

But I hear nothing. I know I must be missing something simple, but what?
Ideally, once this works, I'd like to attach my two datepickers to it so I
can hear the date being selected as well. Thanks for any ideas.

--
Alex Hall
Automatic Distributors, IT department
<EMAIL REMOVED>