From HTML WG Wiki
Jump to: navigation, search


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:

  1. Two additional elements would be created, <fbody> and <dbody>.
  2. 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."
  3. 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.
  4. 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.


All of the impact detailed in DdDtFcaptionDlabel DdDtFcaptionDlabel applies equally here. In addition, authors would have a dedicated element they could reach for when needed to aid in grouping together the content of <figure> and <details, with clear mental parallels to the existing heading/body structure embodied currently in the <thead> and <tbody> elements for .