See https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec/Rich_Attributes
In this phase of the work, we introduce a uniform marking mechanism to allow generic traversal of HTML including Rich Attributes. In particular three types can be distinguished: "plain string" (ie, "not a rich attribute"), "structured object" (including embedded strings and document fragments), and "document fragment". Traversing an extended DOM tree, including document fragments embedded in attributes, should be possible without parsoid-specific knowledge.