A
A
Alex2020-08-21 20:20:58
User interface
Alex, 2020-08-21 20:20:58

How to make an accessible spoiler?

There is a simple "spoiler" component - text that is visually hidden and only available on click.



The problem is that the screen reader reads this text. Hence the question:
How to implement such a spoiler available? So that the screen reader, reading a paragraph of text, read the spoiler as "Spoiler" or "Hidden text" and made it clear to the user that you can click here and "open the text"? And that after opening it was read normally?

And the main question: is it necessary to do this at all? That is, purely logically, I believe that yes: if there is information that should be hidden, then it should be hidden for readers, but maybe there is something I don’t know about?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Druzhaev, 2020-08-21
@Kozack

Questions and implementations in Google wagon: accessibility spoiler
No thanks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question