Skip to content

Commit

Permalink
Allow heading content within legend and summary elements
Browse files Browse the repository at this point in the history
Closes #4990.
  • Loading branch information
scottaohara committed Feb 19, 2020
1 parent 4970db0 commit db55877
Showing 1 changed file with 39 additions and 9 deletions.
48 changes: 39 additions & 9 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -16213,7 +16213,7 @@ isn't his only passion. He also enjoys other pleasures.</p>
<dd><span>Palpable content</span>.</dd>
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>As a child of an <code>hgroup</code> element.</dd>
<dd>Where <span>flow content</span> is expected.</dd>
<dd>Where <span>flow content</span> or <span>heading content</span> is expected.</dd>
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
<dd><span>Phrasing content</span>.</dd>
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
Expand Down Expand Up @@ -16314,7 +16314,7 @@ interface <dfn>HTMLHeadingElement</dfn> : <span>HTMLElement</span> {
<dd><span>Heading content</span>.</dd>
<dd><span>Palpable content</span>.</dd>
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>Where <span>flow content</span> is expected.</dd>
<dd>Where <span>flow content</span> or <span>heading content</span> is expected.</dd>
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
<dd>One or more <code>h1</code>, <code>h2</code>, <code>h3</code>, <code>h4</code>,
<code>h5</code>, <code>h6</code> elements, optionally intermixed with <span>script-supporting
Expand Down Expand Up @@ -53274,6 +53274,31 @@ interface <dfn>HTMLFieldSetElement</dfn> : <span>HTMLElement</span> {

</div>

<div class="example">

<p>This example shows a grouping of controls where the <code>legend</code> element both labels
the grouping, and the nested heading element surfaces the grouping in the document outline:</p>

<pre><code class="html" data-x="">&lt;fieldset>
&lt;legend> &lt;h2>
How can we best reach you?
&lt;/h2> &lt;/legend>
&lt;p> &lt;label>
&lt;input type=radio checked name=contact_pref>
Phone
&lt;/label> &lt;/p>
&lt;p> &lt;label>
&lt;input type=radio name=contact_pref>
Text
&lt;/label> &lt;/p>
&lt;p> &lt;label>
&lt;input type=radio name=contact_pref>
Email
&lt;/label> &lt;/p>
&lt;/fieldset></code></pre>

</div>


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

Expand All @@ -53283,7 +53308,7 @@ interface <dfn>HTMLFieldSetElement</dfn> : <span>HTMLElement</span> {
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>As the <span>first child</span> of a <code>fieldset</code> element.</dd>
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
<dd><span>Phrasing content</span>.</dd>
<dd><span>Phrasing content</span>, optionally intermixed with <span>heading content</span>.</dd>
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
<dd><span>Global attributes</span></dd>
<dt><span
Expand Down Expand Up @@ -57950,8 +57975,7 @@ interface <dfn>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>As the <span>first child</span> of a <code>details</code> element.</dd>
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
<dd>Either: <span>phrasing content</span>.</dd>
<dd>Or: one element of <span>heading content</span>.</dd>
<dd><span>Phrasing content</span>, optionally intermixed with <span>heading content</span>.</dd>
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
<dd><span>Global attributes</span></dd>
<dt><span
Expand Down Expand Up @@ -120608,7 +120632,8 @@ interface <dfn>External</dfn> {
<td><span data-x="Flow content">flow</span>;
<span data-x="Heading content">heading</span>;
<span data-x="Palpable content">palpable</span></td>
<td><code>hgroup</code>;
<td><code>legend</code>;
<code>summary</code>;
<span data-x="Flow content">flow</span></td>
<td><span data-x="Phrasing content">phrasing</span></td>
<td><span data-x="global attributes">globals</span></td>
Expand Down Expand Up @@ -120642,7 +120667,10 @@ interface <dfn>External</dfn> {
<td><span data-x="Flow content">flow</span>;
<span data-x="Heading content">heading</span>;
<span data-x="Palpable content">palpable</span></td>
<td><span data-x="Flow content">flow</span></td>
<td>
<code>legend</code>;
<code>summary</code>;
<span data-x="Flow content">flow</span></td>
<td><code>h1</code>;
<code>h2</code>;
<code>h3</code>;
Expand Down Expand Up @@ -120833,7 +120861,8 @@ interface <dfn>External</dfn> {
<td>Caption for <code>fieldset</code></td>
<td>none</td>
<td><code>fieldset</code></td>
<td><span data-x="Phrasing content">phrasing</span></td>
<td><span data-x="Phrasing content">phrasing</span>;
<span data-x="heading content">heading content</span></td>
<td><span data-x="global attributes">globals</span></td>
<td><code>HTMLLegendElement</code></td>
</tr>
Expand Down Expand Up @@ -121378,7 +121407,8 @@ interface <dfn>External</dfn> {
<td>Caption for <code>details</code></td>
<td>none</td>
<td><code>details</code></td>
<td><span data-x="Phrasing content">phrasing</span></td>
<td><span data-x="Phrasing content">phrasing</span>;
<span data-x="Heading content">heading content</span></td>
<td><span data-x="global attributes">globals</span></td>
<td><code>HTMLElement</code></td>
</tr>
Expand Down

0 comments on commit db55877

Please sign in to comment.