E-mail List Archives

Re: Speaking text through screen reader on webpage?

for

From: Jonathan Avila
Date: Apr 27, 2016 7:48AM


> But I hear nothing. I know I must be missing something simple, but what?

Three comments:
* JAWS 17 I believe fixes a an issue with prior versions of JAWS in IE not announcing some live regions. So if you are using IE and JAWS it could be related to that. If you are using a different screen reader it may be useful to try different screen readers.
* As Joe pointed out it could be related to how you are hiding the content with display:none (depending on screen reader it should may work with display:none though
* An FYI The role of log is by default a live region a shouldn't require adding aria-live -- but you seem to be wanting to change the default "polite" threshold to "assertive" -- in theory that should work -- but I thought I'd point it out.

Jonathan

Jonathan Avila
Chief Accessibility Officer
SSB BART Group
<EMAIL REMOVED>
703.637.8957 (Office)
Visit us online: Website | Twitter | Facebook | Linkedin | Blog
Check out our Digital Accessibility Webinars!


-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Alex Hall
Sent: Wednesday, April 27, 2016 9:29 AM
To: <EMAIL REMOVED>
Subject: [WebAIM] Speaking text through screen reader on webpage?

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>