Question

I have a web application that does most of my updates client side.

This application needs to meet some accessibility standards that I can't seem to get working.

Specifically, if I do something like this with a button click:

$("#myDiv").html("this is text that is now added to the page");

My screen readers are not reading that text unless I put my mouse over them. Is there a way to force them to read any updated content?

Was it helpful?

Solution

you have to use WAI-ARIA, the Accessible Rich Internet Applications Suite to make you web application more accessible. you could add Aria-live attribute to specify the way to announce the refresh content:

  • (off) Default. Updates should not be announced.
  • (polite) Updates should only be announced if the user is idle.
  • (assertive) Updates should be announced to the user as soon as possible.
  • (rude) Updates should be announced immediately, interrupting the user if necessary.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top