html5 - Should headings in figure elements not be considered document headings? -


assume have page this:

<!doctype html><html><body>  <article>   <h1>heading example</h1>     <p>here heading (level 2) looks like:</p>     <figure>       <h2>demo heading</h2>     </figure> </article>  </body></html> 

when parsing page, should h2 element not considered semantic start of new subsection? there program in service exhibits such behavior (specifically treats headings within figures differently when parsing document)? know of html5 spec, think should not considered start of new subsection, perhaps should , i'm incorrect.

a figure sectioning root. first heading in sectioning root never starts subsection regardless of rank, unless heading appears after or within different sectioning content element within sectioning root, instance article > h1 in page. here relevant part of spec:

the first element of heading content in element of sectioning content represents heading section. subsequent headings of equal or higher rank start new (implied) sections, headings of lower rank start implied subsections part of previous one. in both cases, element represents heading of implied section.

notice paragraph not mention sectioning roots. difference between sectioning content element , sectioning root element latter has own outline separate rest of page. otherwise they're same.

so, in theory, correct. how behavior should be. i'm not familiar outline implementations , i'm not aware if exist don't implement multiple sectioning roots correctly. did run snippet through this tool , seems handle correctly (sectioning roots other body hidden default can choose display of them).


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -