kotlinx.html icon indicating copy to clipboard operation
kotlinx.html copied to clipboard

DT tag should allow more child types (should not be `PhrasingContent`)

Open owengray-google opened this issue 1 year ago • 0 comments

According to the HTML spec (https://html.spec.whatwg.org/#the-dt-element), the dt element is "Categories: None" and "Content model: Flow content, but with no header, footer, sectioning content, or heading content descendants."
However, in kotlinx.html, dt is HtmlInlineTag, which is PhrasingContent, meaning it only supports children that can exist in PhrasingContent contexts.

This can currently be worked around with unsafe, but that should not be necessary.

(Conceptually, Phrasing content is a subset of Flow content, and there are things (like dt) that don't match any of the content types--I think there is an issue with the overall hierarchy, but that is beyond the scope of this bug.)

owengray-google avatar May 12 '23 17:05 owengray-google