This change proposal proposes changes identical to DdDtFcaptionDlabel DdDtFcaptionDlabel, but with optional fbody and dbody elements that can be used to wrap the contents of the elements (the figure, in the case of <figure>, or the details, in the case of <details>).
All reasoning given in the rationale section for DdDtFcaptionDlabel DdDtFcaptionDlabel applies equally here, except for the final one, "Does Not Introduce Redundant Elements for the Content".
In addition, authors will very commonly style the contents of a <figure> or <details> in addition to the caption/summary of such. While some styling can be easily done by directly referencing the relevant child elements, in many cases it is easiest to apply styling with a wrapper element around the contents. Rather than requiring the use of a <div> in such a common circumstance, an <fbody> (for <figure>) or <dbody> (for <details>) element can be used to explicitly group the contents together.
Most of the necessary changes are already detailed in DdDtFcaptionDlabel DdDtFcaptionDlabel. In addition, the following changes would be required:
- Two additional elements would be created, <fbody> and <dbody>.
- The content model of <figure would be changed to "Flow content or fbody element, optionally either preceded by or followed by an fcaption element; the content model of <details> would be changed to "One dlabel element, followed by Flow content or dbody element."
- Content models of both fbody and dbody are "Flow content", with content descriptions matching the current descriptions given in figure and details of the element's figure and details, respectively.
- It is an error for a <figure> or <details> to have multiple <fbody> or <dbody> elements. It is an error for <figure> or <details> to have an <fbody> or <dbody> child and additional flow content children. All content that is not the figure caption or details summary, however, is the figure or details of the element.