A feature for marking “spoilers” is a fairly common addition to community sites. It’s unusual but not without precedent to see them in other contexts, such as an article.
As far as I am aware, the origin, and hence name, is to hide a portion of text that talks about a recent movie or episode of a television show to hide it from anyone who hasn’t seen it yet and doesn’t want details spoiled unless they actively take action to reveal it. Spoilers are also increasingly used for material that requires a content warning. I have also seen them used to hide an answer to a problem, allowing readers to work it out for themselves before checking that they got it right on their own.
Spoilers are similar to details/summary but there are some important differences
- spoilers are an inline element
- the hidden content is not collapsed, it is obscured: generally by rendering the content entirely black, as if it had been redacted with a permanent marker, like a classified bit of a government report
- a summary would defeat the point, though there could be a reason for why the content is obscured
While spoilers all tend to look roughly the same the method to reveal the underlying content differs. Some only show on hover. Some require a tap/click and some of those then cannot be re-hidden. Most don’t stay hidden when highlighted. Very few tend to work with keyboards.
It would be good to standardize these not just because they’re common but to make sure they’re accessible and uniform.
While there would be a lot of details to work out, I imagine they would be very easy to polyfill allowing the various platforms to transition to the standard tags while browsers roll them out.