@@ -10696,7 +10696,7 @@ console.assert(image.height === 200);</pre>
10696
10696
<li><code>kbd</code></li>
10697
10697
<li><code>label</code></li>
10698
10698
<li><code>link</code> (if it is <span>allowed in the body</span>)</li>
10699
- <li><code>main</code></li>
10699
+ <li><code>main</code> (if it is a <span>hierarchically correct <code>main</code> element</span>) </li>
10700
10700
<li><code>map</code></li>
10701
10701
<li><code>mark</code></li>
10702
10702
<li><span>MathML <code>math</code></span></li>
@@ -15170,7 +15170,7 @@ interface <dfn>HTMLBodyElement</dfn> : <span>HTMLElement</span> {};
15170
15170
<dd w-nohtml>Uses <code>HTMLBodyElement</code>.</dd>
15171
15171
</dl>
15172
15172
15173
- <p>The <code>body</code> element <span>represents</span> the main content of the document.</p>
15173
+ <p>The <code>body</code> element <span>represents</span> the contents of the document.</p>
15174
15174
15175
15175
<p>In conforming documents, there is only one <code>body</code> element. The <code
15176
15176
data-x="dom-document-body">document.body</code> IDL attribute provides scripts with easy access to
@@ -15550,7 +15550,7 @@ interface <dfn>HTMLBodyElement</dfn> : <span>HTMLElement</span> {};
15550
15550
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
15551
15551
<dd>Where <span>flow content</span> is expected.</dd>
15552
15552
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
15553
- <dd><span>Flow content</span>, but with no <code>main</code> element descendants .</dd>
15553
+ <dd><span>Flow content</span>.</dd>
15554
15554
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
15555
15555
<dd><span>Global attributes</span></dd>
15556
15556
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -15727,7 +15727,7 @@ interface <dfn>HTMLBodyElement</dfn> : <span>HTMLElement</span> {};
15727
15727
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
15728
15728
<dd>Where <span>flow content</span> is expected.</dd>
15729
15729
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
15730
- <dd><span>Flow content</span>, but with no <code>main</code> element descendants .</dd>
15730
+ <dd><span>Flow content</span>.</dd>
15731
15731
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
15732
15732
<dd><span>Global attributes</span></dd>
15733
15733
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -16116,7 +16116,8 @@ Space is not the only void</pre>
16116
16116
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
16117
16117
<dd>Where <span>flow content</span> is expected.</dd>
16118
16118
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
16119
- <dd><span>Flow content</span>, but with no <code>header</code>, <code>footer</code>, or <code>main</code> element descendants.</dd>
16119
+ <dd><span>Flow content</span>, but with no <code>header</code> or <code>footer</code> element
16120
+ descendants.</dd>
16120
16121
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
16121
16122
<dd><span>Global attributes</span></dd>
16122
16123
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -16202,7 +16203,8 @@ Space is not the only void</pre>
16202
16203
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
16203
16204
<dd>Where <span>flow content</span> is expected.</dd>
16204
16205
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
16205
- <dd><span>Flow content</span>, but with no <code>header</code>, <code>footer</code>, or <code>main</code> element descendants.</dd>
16206
+ <dd><span>Flow content</span>, but with no <code>header</code> or <code>footer</code> element
16207
+ descendants.</dd>
16206
16208
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
16207
16209
<dd><span>Global attributes</span></dd>
16208
16210
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -18960,9 +18962,9 @@ first matching case):</p>
18960
18962
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
18961
18963
<dd>Where <span>flow content</span> is expected.</dd>
18962
18964
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
18963
- <dd>Either: One <code>figcaption</code> element followed by <span>flow content</span>.</dd>
18964
- <dd>Or: <span>Flow content</span> followed by one <code>figcaption</code> element.</dd>
18965
- <dd>Or: <span>Flow content</span>.</dd>
18965
+ <dd>Either: one <code>figcaption</code> element followed by <span>flow content</span>.</dd>
18966
+ <dd>Or: <span>flow content</span> followed by one <code>figcaption</code> element.</dd>
18967
+ <dd>Or: <span>flow content</span>.</dd>
18966
18968
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
18967
18969
<dd><span>Global attributes</span></dd>
18968
18970
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -19182,7 +19184,8 @@ included with Exhibit B.
19182
19184
<dd><span>Flow content</span>.</dd>
19183
19185
<dd><span>Palpable content</span>.</dd>
19184
19186
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
19185
- <dd>Where <span>flow content</span> is expected.</dd>
19187
+ <dd>Where <span>flow content</span> is expected, but only if it is a <span>hierarchically correct
19188
+ <code>main</code> element</span>.</dd>
19186
19189
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
19187
19190
<dd><span>Flow content</span>.</dd>
19188
19191
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
@@ -19191,15 +19194,17 @@ included with Exhibit B.
19191
19194
<dd>Uses <code>HTMLElement</code>.</dd>
19192
19195
</dl>
19193
19196
19194
- <p>The <code>main</code> element can be used as a container for the dominant contents of the
19195
- document. It <span>represents</span> its children. </p>
19197
+ <p>The <code>main</code> element <span>represents</span> the dominant contents of the
19198
+ document.</p>
19196
19199
19197
- <p class="note">The <code>main</code> element is distinct from the <code>section</code> and
19198
- <code>article</code> elements in that the <code>main</code> element does not contribute to the
19199
- document <span>outline</span>.</p>
19200
+ <p>A document must not have more than one <code>main</code> element that does not have the <code
19201
+ data-x="attr-hidden">hidden</code> attribute specified.</p>
19200
19202
19201
- <p class="note">While there is no restriction as to the number of <code>main</code> elements in a
19202
- document, web developers are encouraged to stick to a single element.</p>
19203
+ <p>A <dfn>hierarchically correct <code>main</code> element</dfn> is one whose ancestor elements
19204
+ are limited to <code>html</code>, <code>body</code>, <code>div</code>, <code>form</code> without
19205
+ an <span data-x="concept-accessible-name">accessible name</span>, and <span data-x="autonomous
19206
+ custom element">autonomous custom elements</span>. Each <code>main</code> element must be a
19207
+ <span>hierarchically correct <code>main</code> element</span>.</p>
19203
19208
19204
19209
<div class="example">
19205
19210
@@ -19241,6 +19246,35 @@ included with Exhibit B.
19241
19246
</footer>
19242
19247
</html></pre>
19243
19248
19249
+ <p>In the following example, multiple <code>main</code> elements are used and script is used to
19250
+ make navigation work without a server roundtrip and to set the <code
19251
+ data-x="attr-hidden">hidden</code> attribute on those that are not current:
19252
+
19253
+ <pre><!doctype html>
19254
+ <html lang=en-CA>
19255
+ <meta charset=utf-8>
19256
+ <title> … </title>
19257
+ <link rel=stylesheet href=spa.css>
19258
+ <script src=spa.js async></script>
19259
+ <nav>
19260
+ <a href=/>Home</a>
19261
+ <a href=/about>About</a>
19262
+ <a href=/contact>Contact</a>
19263
+ </nav>
19264
+ <main>
19265
+ <h1>Home</h1>
19266
+ …
19267
+ </main>
19268
+ <main hidden>
19269
+ <h1>About</h1>
19270
+ …
19271
+ </main>
19272
+ <main hidden>
19273
+ <h1>Contact</h1>
19274
+ …
19275
+ </main>
19276
+ <footer>Made with ❤️ by <a href=https://example.com/>Example 👻</a>.</footer></pre>
19277
+
19244
19278
</div>
19245
19279
19246
19280
@@ -19256,7 +19290,7 @@ included with Exhibit B.
19256
19290
<dd>As a child of a <code>dl</code> element.</dd>
19257
19291
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
19258
19292
<dd>If the element is a child of a <code>dl</code> element: one or more <code>dt</code> elements followed by one or more <code>dd</code> elements, optionally intermixed with <span>script-supporting elements</span>.</dd>
19259
- <dd>If the element is not a child of a <code>dl</code> element: <span>Flow content</span>.</dd>
19293
+ <dd>If the element is not a child of a <code>dl</code> element: <span>flow content</span>.</dd>
19260
19294
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
19261
19295
<dd><span>Global attributes</span></dd>
19262
19296
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
@@ -116450,10 +116484,10 @@ interface <dfn>External</dfn> {
116450
116484
116451
116485
<tr>
116452
116486
<th><code>main</code></th>
116453
- <td>Container for the dominant contents of another element </td>
116487
+ <td>Container for the dominant contents of the document </td>
116454
116488
<td><span data-x="Flow content">flow</span>;
116455
116489
<span data-x="Palpable content">palpable</span></td>
116456
- <td><span data-x="Flow content">flow</span></td>
116490
+ <td><span data-x="Flow content">flow</span>* </td>
116457
116491
<td><span data-x="Flow content">flow</span></td>
116458
116492
<td><span data-x="global attributes">globals</span></td>
116459
116493
<td><code>HTMLElement</code></td>
@@ -117336,7 +117370,6 @@ interface <dfn>External</dfn> {
117336
117370
<code>ins</code>;
117337
117371
<code>kbd</code>;
117338
117372
<code>label</code>;
117339
- <code>main</code>;
117340
117373
<code>map</code>;
117341
117374
<code>mark</code>;
117342
117375
<span>MathML <code>math</code></span>;
@@ -117379,6 +117412,7 @@ interface <dfn>External</dfn> {
117379
117412
<td>
117380
117413
<code>area</code> (if it is a descendant of a <code>map</code> element);
117381
117414
<code>link</code> (if it is <span>allowed in the body</span>);
117415
+ <code>main</code> (if it is a <span>hierarchically correct <code>main</code> element</span>);
117382
117416
<code>meta</code> (if the <code data-x="attr-itemprop">itemprop</code> attribute is present)
117383
117417
117384
117418
<tr>
@@ -120610,6 +120644,7 @@ INSERT INTERFACES HERE
120610
120644
Alfred Agrell, <!-- Alcaro on GitHub -->
120611
120645
Ali Juma,
120612
120646
Alice Boxhall,
120647
+ Alice Wonder,
120613
120648
Allan Clements,
120614
120649
Allen Wirfs-Brock,
120615
120650
Alex Komoroske,
0 commit comments