Skip to content

Commit db55877

Browse files
authored
Allow heading content within legend and summary elements
Closes #4990.
1 parent 4970db0 commit db55877

File tree

1 file changed

+39
-9
lines changed

1 file changed

+39
-9
lines changed

source

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16213,7 +16213,7 @@ isn't his only passion. He also enjoys other pleasures.</p>
1621316213
<dd><span>Palpable content</span>.</dd>
1621416214
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
1621516215
<dd>As a child of an <code>hgroup</code> element.</dd>
16216-
<dd>Where <span>flow content</span> is expected.</dd>
16216+
<dd>Where <span>flow content</span> or <span>heading content</span> is expected.</dd>
1621716217
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
1621816218
<dd><span>Phrasing content</span>.</dd>
1621916219
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
@@ -16314,7 +16314,7 @@ interface <dfn>HTMLHeadingElement</dfn> : <span>HTMLElement</span> {
1631416314
<dd><span>Heading content</span>.</dd>
1631516315
<dd><span>Palpable content</span>.</dd>
1631616316
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
16317-
<dd>Where <span>flow content</span> is expected.</dd>
16317+
<dd>Where <span>flow content</span> or <span>heading content</span> is expected.</dd>
1631816318
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
1631916319
<dd>One or more <code>h1</code>, <code>h2</code>, <code>h3</code>, <code>h4</code>,
1632016320
<code>h5</code>, <code>h6</code> elements, optionally intermixed with <span>script-supporting
@@ -53274,6 +53274,31 @@ interface <dfn>HTMLFieldSetElement</dfn> : <span>HTMLElement</span> {
5327453274

5327553275
</div>
5327653276

53277+
<div class="example">
53278+
53279+
<p>This example shows a grouping of controls where the <code>legend</code> element both labels
53280+
the grouping, and the nested heading element surfaces the grouping in the document outline:</p>
53281+
53282+
<pre><code class="html" data-x="">&lt;fieldset>
53283+
&lt;legend> &lt;h2>
53284+
How can we best reach you?
53285+
&lt;/h2> &lt;/legend>
53286+
&lt;p> &lt;label>
53287+
&lt;input type=radio checked name=contact_pref>
53288+
Phone
53289+
&lt;/label> &lt;/p>
53290+
&lt;p> &lt;label>
53291+
&lt;input type=radio name=contact_pref>
53292+
Text
53293+
&lt;/label> &lt;/p>
53294+
&lt;p> &lt;label>
53295+
&lt;input type=radio name=contact_pref>
53296+
Email
53297+
&lt;/label> &lt;/p>
53298+
&lt;/fieldset></code></pre>
53299+
53300+
</div>
53301+
5327753302

5327853303
<h4>The <dfn><code>legend</code></dfn> element</h4>
5327953304

@@ -53283,7 +53308,7 @@ interface <dfn>HTMLFieldSetElement</dfn> : <span>HTMLElement</span> {
5328353308
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
5328453309
<dd>As the <span>first child</span> of a <code>fieldset</code> element.</dd>
5328553310
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
53286-
<dd><span>Phrasing content</span>.</dd>
53311+
<dd><span>Phrasing content</span>, optionally intermixed with <span>heading content</span>.</dd>
5328753312
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
5328853313
<dd><span>Global attributes</span></dd>
5328953314
<dt><span
@@ -57950,8 +57975,7 @@ interface <dfn>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
5795057975
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
5795157976
<dd>As the <span>first child</span> of a <code>details</code> element.</dd>
5795257977
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
57953-
<dd>Either: <span>phrasing content</span>.</dd>
57954-
<dd>Or: one element of <span>heading content</span>.</dd>
57978+
<dd><span>Phrasing content</span>, optionally intermixed with <span>heading content</span>.</dd>
5795557979
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
5795657980
<dd><span>Global attributes</span></dd>
5795757981
<dt><span
@@ -120608,7 +120632,8 @@ interface <dfn>External</dfn> {
120608120632
<td><span data-x="Flow content">flow</span>;
120609120633
<span data-x="Heading content">heading</span>;
120610120634
<span data-x="Palpable content">palpable</span></td>
120611-
<td><code>hgroup</code>;
120635+
<td><code>legend</code>;
120636+
<code>summary</code>;
120612120637
<span data-x="Flow content">flow</span></td>
120613120638
<td><span data-x="Phrasing content">phrasing</span></td>
120614120639
<td><span data-x="global attributes">globals</span></td>
@@ -120642,7 +120667,10 @@ interface <dfn>External</dfn> {
120642120667
<td><span data-x="Flow content">flow</span>;
120643120668
<span data-x="Heading content">heading</span>;
120644120669
<span data-x="Palpable content">palpable</span></td>
120645-
<td><span data-x="Flow content">flow</span></td>
120670+
<td>
120671+
<code>legend</code>;
120672+
<code>summary</code>;
120673+
<span data-x="Flow content">flow</span></td>
120646120674
<td><code>h1</code>;
120647120675
<code>h2</code>;
120648120676
<code>h3</code>;
@@ -120833,7 +120861,8 @@ interface <dfn>External</dfn> {
120833120861
<td>Caption for <code>fieldset</code></td>
120834120862
<td>none</td>
120835120863
<td><code>fieldset</code></td>
120836-
<td><span data-x="Phrasing content">phrasing</span></td>
120864+
<td><span data-x="Phrasing content">phrasing</span>;
120865+
<span data-x="heading content">heading content</span></td>
120837120866
<td><span data-x="global attributes">globals</span></td>
120838120867
<td><code>HTMLLegendElement</code></td>
120839120868
</tr>
@@ -121378,7 +121407,8 @@ interface <dfn>External</dfn> {
121378121407
<td>Caption for <code>details</code></td>
121379121408
<td>none</td>
121380121409
<td><code>details</code></td>
121381-
<td><span data-x="Phrasing content">phrasing</span></td>
121410+
<td><span data-x="Phrasing content">phrasing</span>;
121411+
<span data-x="Heading content">heading content</span></td>
121382121412
<td><span data-x="global attributes">globals</span></td>
121383121413
<td><code>HTMLElement</code></td>
121384121414
</tr>

0 commit comments

Comments
 (0)