T118517 is an approved RFC to emit the more semantic HTML5 `<figure>` tags around media, as described in [[ https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images | Parsoid's spec ]].
However, `<figure>` elements are not phrasing content and therefore do not capture the proper semantics in all contexts in which media are used.
This RFC is about emitting `<figure-inline>` tags for media in contexts where phrasing content should be found.
The "-inline" suffix comes from the HTML4 block vs inline distinction, where "inline" [[ https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements#Block-level_vs._inline | roughly corresponds ]] with HTML5 phrasing content.
Currently, Parsoid implements its spec and the custom `<figure-inline>` tag seems to be working well in practice. However, while custom elements are permitted by the standard, there is a concern that we're picking an overly broad name that may eventually lead to conflict.
Some options to consider,
- Revert to using a non-semantic `<span>` tag for phrasing content
- Use a vendor prefixed name instead for phrasing content, like `<mw-figure-inline>`
- Use a vendor prefixed name in all contexts, instead of the standard `<figure>`, for all around consistency and to avoid breaking paragraphs
- Push to get `<figure-inline>` standardized, but there might be more goodwill if go that route before shipping it
// FIXME: The Parsing team should champion a recommendation to bring to TechCom, so let's come to a consensus on that ...
The #parsing-team has a longer-term goal of [[ https://www.mediawiki.org/wiki/Parsing/Parser_Unification | unifying ]] the legacy wikitext parser (#mediawiki-parser) with #parsoid. Getting their media output to match is one step along that road.