Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow heading content within a legend element #5090

Merged
merged 10 commits into from
Feb 19, 2020
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 @@ -16310,7 +16310,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 @@ -52670,6 +52670,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 @@ -52679,7 +52704,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 data-x="concept-element-dom">DOM interface</span>:</dt>
Expand Down Expand Up @@ -57345,8 +57370,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 data-x="concept-element-dom">DOM interface</span>:</dt>
Expand Down Expand Up @@ -119594,7 +119618,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 @@ -119628,7 +119653,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 @@ -119817,7 +119845,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 @@ -120362,7 +120391,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