0

Currently in span tag (inside class .next) their is "page 1 currently active". But when I clicked on anchor tag (class .next) the span tag updated quickly to "page 2 currently active". The problem is screen reader does not read the new updated value it still read "page 1 currently active".

Before clicked:

<a class="prev" role="button" tabindex="0">
    <span class="screenreader"></span>
</a>
<a class="next" role="button" tabindex="0">
    <span class="screenreader">page 1 currently active</span>
</a>

After clicked:

<a class="prev" role="button" tabindex="0"><span class="screenreader"></span></a>
<a class="next" role="button" tabindex="0"><span class="screenreader">page 2 currently active</span></a>

In jQuery:

var txt="page 2 currently active";
$(".next .screenreader").html(txt);

Preferred the link to see the image. in image you can see i am on page number 3 but screen reader still you are on page number 2

https://i.stack.imgur.com/scCl2.png

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 1
    Please post your tested code, What do you want to display "himanshu" or "Rajpit", Also port Javascript or jQuery you tried. – saAction Sep 24 '18 at 09:52
  • Possible duplicate of [Getting screen reader to read new content added with JavaScript](https://stackoverflow.com/questions/3670570/getting-screen-reader-to-read-new-content-added-with-javascript) – Seblor Sep 26 '18 at 07:47
  • @seblor but its not working for me – himanshu rajput Sep 26 '18 at 07:53
  • please be more specific on what's not working. I don't see the role attribute from Seblors linked post anywhere in your code, so what did you try to do? – cloned Sep 26 '18 at 08:10
  • @cloned i already tried role attribute its not working for me – himanshu rajput Sep 26 '18 at 08:21

0 Answers0