From 25aaa34bc4b8fbbad11a125d57a441f21256206d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onie=20Watson?= Date: Tue, 23 Jan 2018 14:15:13 +0000 Subject: [PATCH] Refines main element definition (#1154) * Refines main element definition * Simplifies the wording to align with the WHATWG * Fixes #1153 * Restores second note --- sections/semantics-grouping-content.include | 29 +++++++-------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/sections/semantics-grouping-content.include b/sections/semantics-grouping-content.include index a484826a8c..01750b8200 100644 --- a/sections/semantics-grouping-content.include +++ b/sections/semantics-grouping-content.include @@ -1644,8 +1644,7 @@
Flow content.
Palpable content.
Contexts in which this element can be used:
-
Where flow content is expected, but with no <{article}>, <{aside}>, <{footer}>, - <{header}> or <{nav}> element ancestors.
+
Where flow content is expected, but only if it is a hierarchically correct main element.
Content model:
Flow content.
Tag omission in text/html:
@@ -1664,19 +1663,20 @@
Uses HTMLElement
- The <{main}> element represents the main content of the <{body}> of a document or application. + The <{main}> element represents the dominant contents of the document. + + A document must not have more than one <{main}> element that does not have the [[#the-hidden-attribute]] attribute specified. + + A hierarchically correct main element is one whose ancestor elements are limited to <{html}>, <{body}>, <{div}>, <{form}> without an accessible name, and autonomous custom elements. Each <{main}> element must be a hierarchically correct main element.

The <{main}> element is not sectioning content and has no effect on the document outline.

- The main content area of a document includes content that is unique to that document and excludes - content that is repeated across a set of documents such as site navigation links, copyright - information, site logos and banners and search forms (unless the document or application's main - function is that of a search form). - There must not be more than one visible <{main}> element in a document. If more than one - <{main}> element is present in a document, all other instances must be hidden using [[#the-hidden-attribute]]. +

+ The <{main}> element is not suitable for identifying the main content areas of sub-sections of a document. The simplest solution is not to mark up the main content of a sub-section at all (leaving it as implicit), but an author could use [[#grouping-content]] or a sectioning content element as appropriate. +

@@ -1692,17 +1692,6 @@
   
- - Authors must not include the <{main}> element as a descendant of an <{article}>, - <{aside}>, <{footer}>, <{header}> or <{nav}> element. - -

- The <{main}> element is not suitable for use to identify the main content areas of sub - sections of a document or application. The simplest solution is to not mark up the main content - of a sub section at all, and just leave it as implicit, but an author could use a - [[#grouping-content]] or sectioning content element as appropriate. -

- In the following example, we see 2 articles about skateboards (the main topic of a Web page) the main topic content is identified by the use of the <{main}> element.