Jump to content
Search Community

textPlugin & accessibility

frank_47340 test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

I tried textPlugin with screenreader (NVDA). It is in a aria-live region. Is not working well because the screenreader starts reading the begin of the sentence multiple times. Each time half the way of a sentence it begins again at the beginning. This is not very user-friendly. I think it is a good idea to warn the users of gsap in the docs?

Link to comment
Share on other sites

I think a workaround could be to dynamically add and remove aria-live. Something like

document.getElementById("text").setAttribute("role", "alert");
and
document.getElementById("text").removeAttribute("role", "alert");
together with onComplete

But I doubt if this is a good practice. My point is that it would be very nice when there is a warning in the docs of textPlugin. For now I choose an other type of animation.

 

Link to comment
Share on other sites

I'll do some tests and update the docs.

 

I wouldn't recommend using aria live though, all aria live looks for is that the element's been updated and then reads out the changes, so yep - it would start from the beginning of the sentence each time.

I would recommend different approaches for heading, vs a lot of paragraph text, but what I've done in the past is set the textPlugin div to aria-hidden and create a duplicate visually hidden div with all the text in.

  • Like 6
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...