It’s strangely difficult to make a “spoilers” element without JS, and even harder to do it with support for all mobile operating systems and screen readers.

A working example

You can press the hidden text to reveal it or navigate to it using the keyboard.

Why did the chicken cross the road? To get to the other side.

Why did the chicken cross the road?
<span tabindex="0" class="spoiler">To get to the other side.</span>

Why the details tag isn’t ideal

The HTML paragraph tag only allows phrasing content as its children. Notably this includes input a…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help