2
0
Fork
You've already forked fep
1
forked from fediverse/fep

FEP-b2b8: Content Warnings #23

Closed
opened 2025年03月26日 17:42:50 +01:00 by david_roetzel · 5 comments

In Mastodon (and thus in other implementations that want to be compatible) we still have the unfortunate situation that we use the summary attribute for content warnings.

The FEP describes summary for Article as I believe it should be, so I think this is fine. But I wonder if this problem / discrepancy should be mentioned in some way.

At the very least I wonder, how would you add a content warning to an Article?

I suspect the answer might depend on the outcome of the work here: https://github.com/swicg/activitypub-trust-and-safety/issues/1

But regardless of that, to be useable for Mastodon and other Mastodon-compatible micro-blogging services, I believe the FEP should address this issue in some way.

But how exactly I am not sure, sorry. Maybe someone can offer an idea?

In Mastodon (and thus in other implementations that want to be compatible) we still have the unfortunate situation that we use the `summary` attribute for content warnings. The FEP describes `summary` for `Article` as I believe it should be, so I think this is fine. But I wonder if this problem / discrepancy should be mentioned in some way. At the very least I wonder, how would you add a content warning to an `Article`? I suspect the answer might depend on the outcome of the work here: https://github.com/swicg/activitypub-trust-and-safety/issues/1 But regardless of that, to be useable for Mastodon and other Mastodon-compatible micro-blogging services, I believe the FEP should address this issue in some way. But how exactly I am not sure, sorry. Maybe someone can offer an idea?

Maybe someone can offer an idea?

I propose <details>:

  • Standard HTML element, easy to support
  • Multiple content warnings can be added
  • Additional metadata (e.g. type of warning) can be specified with tag property
>Maybe someone can offer an idea? I propose [`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details): - Standard HTML element, easy to support - Multiple content warnings can be added - Additional metadata (e.g. type of warning) can be specified with `tag` property

I think in practice people would continue using summary as CW as long as Mastodon does, until this issue is resolved, and preview is the actual field that carries the payload that's a short description of the content. I am going to implement this in Hometown to show the interaction of CWs as currently implemented in Mastodon and the preview field.

I don't know if including the CW in the Article HTML payload as <details> (or anything) would be a great idea; that would put the burden on consumers to parse it out. The proposal already recommends pre-parsing key images for display on the production side; I would expect CW to be treated as a similar first (second?) class piece of data.

I think in practice people would continue using `summary` as CW as long as Mastodon does, until [this issue](https://github.com/swicg/activitypub-trust-and-safety/issues/1) is resolved, and `preview` is the actual field that carries the payload that's a short description of the content. I am going to implement this in Hometown to show the interaction of CWs as currently implemented in Mastodon and the `preview` field. I don't know if including the CW in the Article HTML payload as `<details>` (or anything) would be a great idea; that would put the burden on consumers to parse it out. The proposal already recommends pre-parsing key images for display on the production side; I would expect CW to be treated as a similar first (second?) class piece of data.

I wanted to share an additional data point today that GtS apparently treats summary in as:Article as a content warning. This deviates from Mastodon behaviour which only applies CW for as:Note.

I wanted to share an additional data point today that GtS apparently treats `summary` in `as:Article` as a content warning. This deviates from Mastodon behaviour which only applies CW for `as:Note`.
Owner
Copy link

I don't think embedding metadata in the HTML of the contents is the way to go.

Let's do it this way:

sensitive marks an article as potentially sensitive in the author's opinion. If the sensitive flag is set, the consumer should obscure the content of the article until the user conveys intent to read the article or view embedded media.

To help the user decide whether to read the article or view its media, the consumer should show these properties, if provided, in order:

  • dcterms:subject: a property from the Dublin Core metadata terms. Value should be a string or array of strings indicating the topic or topics discussed in the article.
  • tag: in particular, Hashtag names. (subject is preferred because it's more human-readable).
  • name: as described above, the title of the Article. Authors are more likely to leak sensitive material in the title, so the subject and/or hashtags should be used first.
  • summary: as described above. Only as a last resort when other properties are not defined; a well-written summary is likely to include significant excerpts or summation of the sensitive content.

A minimal example:

{
 "@context": [
 "https://www.w3.org/ns/activitystreams",
 "https://purl.archive.org/miscellany",
 {"dcterms": "http://purl.org/dc/terms/"}
 ],
 "id": "https://example.com/article/1",
 "type": "Article",
 "name": "Spoiler for Citizen Kane",
 "summary": "<p>I am going to tell you what Rosebud was. Buckle up!</p>"
 "sensitive": true,
 "dcterms:subject": ["Citizen Kane"],
 "contents": "<p>Rosebud was his sled!</p>"
 "tag": {
 "id": "https://example.com/tag/spoilers",
 "name": "spoilers",
 "type": "Hashtag"
 }
}
I don't think embedding metadata in the HTML of the contents is the way to go. Let's do it this way: [sensitive](https://swicg.github.io/miscellany/#sensitive) marks an article as potentially sensitive in the author's opinion. If the sensitive flag is set, the consumer should obscure the content of the article until the user conveys intent to read the article or view embedded media. To help the user decide whether to read the article or view its media, the consumer should show these properties, if provided, in order: - `dcterms:subject`: a property from the Dublin Core metadata terms. Value should be a string or array of strings indicating the topic or topics discussed in the article. - `tag`: in particular, `Hashtag` names. (`subject` is preferred because it's more human-readable). - `name`: as described above, the title of the `Article`. Authors are more likely to leak sensitive material in the title, so the subject and/or hashtags should be used first. - `summary`: as described above. Only as a last resort when other properties are not defined; a well-written summary is likely to include significant excerpts or summation of the sensitive content. A minimal example: ``` { "@context": [ "https://www.w3.org/ns/activitystreams", "https://purl.archive.org/miscellany", {"dcterms": "http://purl.org/dc/terms/"} ], "id": "https://example.com/article/1", "type": "Article", "name": "Spoiler for Citizen Kane", "summary": "<p>I am going to tell you what Rosebud was. Buckle up!</p>" "sensitive": true, "dcterms:subject": ["Citizen Kane"], "contents": "<p>Rosebud was his sled!</p>" "tag": { "id": "https://example.com/tag/spoilers", "name": "spoilers", "type": "Hashtag" } } ```
Owner
Copy link

I've added this guidance; hopefully this will be helpful.

I've added this guidance; hopefully this will be helpful.
Sign in to join this conversation.
No Branch/Tag specified
main
fep-d8c2-update
wip/d8c2
fep-4ccd-update
wip/c648
wip/b06c
wip/5711
wip/2c59
wip/76ea
wip/dd4b
wip/c180
wip/b2b8
b2b8-preview-no-link
b06c
76ea-graft-merge-conversation
fep-dd4b-expressing-consent
fep-c180-duplicate-delivery
fep-b2b8-preview-content
fep-b2b8-updates
fep-5711-jsonld
fep-5711
fep-c180-fix-namespace
evanp/fep-c180
fep-dd4b
fep-b2b8
feb-b2b8
76ea
fep-2c59
fep-d8c2
fep-b53d
fep-c648
temporary
fep-4ccd
finalize-1b12
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
evanp/fep#23
Reference in a new issue
evanp/fep
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?