Description
Description of issue
name
is defined as "A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included."
summary
is defined as "A natural language summarization of the object encoded as HTML."
content
includes in its definition that "By default, the value of content is HTML. The mediaType
property can be used in the object to indicate a different content type."
So to synthesize these three definitions:
name
is alwaystext/plain
content
is whatever the value ofmediaType
is, wheremediaType
defaults totext/html
summary
is alwaystext/html
?
But there are cases where a producer might want to signal a different content type for summary
; for example, text/plain
or text/markdown
. Recently, mastodon/mastodon#32538 came up as an example of wanting to produce a summary
that is NOT text/html
. So the question is, might it make sense to provide a mechanism for declaring that summary
is something other than text/html
?
Potential solutions
- Extending the definition of
mediaType
to cover bothcontent
andsummary
could work, but would prevent using different formats for each of the two separately. - Defining a separate property like
mediaTypeOfSummary
seems clunky, but might end up making sense or being necessary. - More explicit construction of a "text node" where every
@value
can have its ownmediaType
, although this would be pretty complicated and not backwards-compatible. (It would also break JSON-LD language containers, sonameMap
/summaryMap
/contentMap
would not work.)
Action items
- Needs Primer: guidance on the natural language properties, including a section on the content-type considerations (and potential sanitizing/stripping resulting from that)
- Next Version: Possibly allowing
summary
to be something other thantext/html
, with eithermediaType
extending to cover it, or definingmediaTypeOfSummary
as an analogous property.