Re: [VE][html5] Warning about multiple h1 seems to go against HTML5 design

2014-05-23 19:09, Tony Middleton wrote:

 > I have a number of pages with a <section> which contains a number of
> <section> groups.  Both the top level section and the subsidiary
> sections have h1 elements.  This I understood is the suggested way of
> doing things in HTML5.

I don't think it ever was the suggested way. Rather, a possible way. 
According to current HTML5 CR, it is still permitted but strongly 
discouraged.

> However,  the validator gives me the following warning for the second
> level h1's.
>
> Consider using the h1 element as a top-level heading only (all h1
> elements are treated as top-level headings by many screen readers and
> other tools

This apparently reflects the change described at
http://lists.w3.org/Archives/Public/public-html/2013Feb/thread.html#msg125
and the current wording at
http://www.w3.org/TR/html5/sections.html#headings-and-sections
which says:
"Sections may contain headings of any rank, and authors are strongly 
encouraged to use headings of the appropriate rank for the section's 
nesting level."

What this means is that you should use <h2> for any heading that is 2nd 
level relative to the page as a whole.

P.S. The <section> element is defined so that it "represents a generic 
section of a document or application". Thus, a <section> element without 
any sibling <section> elements, though permitted formally, is rather 
abnormal. What's the point of dividing something into one piece?

Yucca

Received on Monday, 26 May 2014 15:01:30 UTC