8000 A spoiler element · Issue #9926 · whatwg/html · GitHub
[go: up one dir, main page]

Skip 8000 to content

A spoiler element #9926

@Seirdy

Description

@Seirdy

What problem are you trying to solve?

A standard way to make content inaccessible and opaque to the user without consent, with optional preview text. More details on this proposal are in this article.

What solutions exist today?

  • Custom site-specific solutions (phpBB, TVTropes, Matrix and Discord spoilers, Reddit spoilers, sensitive media on the Fediverse and most search engines' image searchs).
  • The details element, which is not equivalent on semantic, UA behavior, and presentation grounds.

How would you solve it?

A new HTML element (and perhaps a corresponding ARIA role?) called spoiler. The specification for summary could be modified to support being an optional child of spoiler.

Anything else?

An alternative solution was proposed in #8770, but I disagree that styling alone is enough for reasons outlined in the linked article: user-agents and assistive technologies will need to behave differently when faced with spoiler semantics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    addition/proposalNew features or enhancementsneeds implementer interestMoving the issue forward requires implementers to express interest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0