Content warnings as HTML standard?

I really like the possibility to add content warnings to Mastodon posts. It depends on your Mastodon app or client how this is handled in detail but the idea is to hide sensitive or triggering content initially. After you gave your consent, the content gets revealed. I just thought about, that this could (or better should) become a standard in HTML, too.

HTML meta tag

I have absolutely no idea how browsers are built, but the implementations for web developers could be quite easy. In HTML there is a working system of meta tags in the <head> section of a website which could be used.

<meta name="content-warning" content="some information or pre-defined categories">

It’s just a rough idea, but as a first draft it should do the trick. Now the content warning could be shown before you visit a website, just like the security warning if SSL certificates are not available or invalid.

HTML element attribute

With an additional attribute for elements it would be possible to mark sensitive content on the page instead of blocking it as a whole.

<section content-warning="some information or pre-defined categories">
  ...
</section>

From a user’s perspective

If the user visits a website with a content warning regularly, one could mark a specific domain as trusted and hide the warning for every page of this website from now on. With a standard for common categories, it would also be possible to block only pages with a specific topic to minimize browser interruptions.

Existing solutions

I did a quick search if something like this already exists and found a category meta tag which I didn’t know before. Unfortunately I still don’t know how it is used? Maybe someone who’s smarter than I am could explain it to me? Is it just for search engines?

<meta name="category" content="">

Furthermore I found an open issue on GitHub for the WHATWG which suggests pretty much the same thing but has received little attention so far. Of course I am not the first to come up with this idea. But I didn’t found that much information around the topic.

From my point of view content warnings in HTML could make another small contribution to making the web more secure and inclusive.

Links


HTML General #Standards #Web

What do you think?

Let's discuss on Mastodon

More …

Latest

Drowning in tabs?

Featured

Use Kirby content representations for custom view modes

pageview counter pixel