Screen readers vs hidden and/or spoiler text

Maybe the HTML elements <summary> & <details> could be a viable option.
Link: <details>: The Details disclosure element - HTML: HyperText Markup Language | MDN

The question/hint topic would be in the summary, and the spoiler in the details.

From a cursory web search, I’m not sure how well screen readers currently support this mechanism, but it seems an interesting approach. Some more links:
Accessible accordions part 2 - using <details> and <summary> - Hassell Inclusion and Expanding summary details tag accessibility | Pat Godfrey | Blog | User Experience and summary_element (html) | Accessibility Support and The details and summary elements | scottohara.me. (Quoting from the last link: “Generally screen readers do well with standard usage of the details and summary elements.”)

1 Like