Re: [w3c/wcag] Modal titles - what element to use? (Discussion #2722)

I am reposting an email I sent in reply to a GitHub post -  since Bruce mentioned that GitHub mashed it up so badly it was unreadable.
So here is what it was supposed to look like

gregg





I think people are referring to this line in the HTML spec   http://w3.org/TR/HTML <http://w3.org/TR/HTML>

People quote the last line of section 4.3.11 (the second item pasted below  the dotted line).  The last line of 4.3.11 reads
Each heading <https://html.spec.whatwg.org/multipage/sections.html#concept-heading> following another heading <https://html.spec.whatwg.org/multipage/sections.html#concept-heading> lead in the outline <https://html.spec.whatwg.org/multipage/sections.html#outline> must have a heading level <https://html.spec.whatwg.org/multipage/sections.html#heading-level> that is less than, equal to, or 1 greater than lead's heading level <https://html.spec.whatwg.org/multipage/sections.html#heading-level>.

It is unclear if this is talking about "Headings and Outlines"  or talking about "All use of Headings" 
One CAN take it to mean that this is how all docs should be so that they outline well
( But the other sections on Headings do not mention a MUST regarding the strict hierarchy. ) (They are all pasted below the dotted line here) 

So I leave it to you all to decide what is meant here — and who and when each provision is meant to apply


But there is a place in the HTML Spec that says MUST
And it does say that headings under the lead MUST be 
 -  LESS THAN      (you can have H3 followed by H1)
 -  EQUAL TO       (you can have  H3 followed by H3)
 - or 1 greater than      (you can have H3 followed by H4)

But the MUST statement does not allow    
 H3 followed by  H5,  
nor   
 H1 followed by H3



Gregg



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Here are all the references in the HTML spec regarding Headings. 


3.2.5.2.4 Heading content <https://html.spec.whatwg.org/multipage/dom.html#heading-content>
Heading content defines the heading of a section (whether explicitly marked up using sectioning content <https://html.spec.whatwg.org/multipage/dom.html#sectioning-content-2> elements, or implied by the heading content itself).

h1 <https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>,h2 <https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>,h3 <https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>,h4 <https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>,h5 <https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>,h6 <https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>,hgroup <https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element> (if it has a descendant h1 <https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements> to h6 <https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements> element)

4.3.11 Headings and outlines <https://html.spec.whatwg.org/multipage/sections.html#headings-and-outlines-2>
h1 <https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>–h6 <https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements> elements have a heading level, which is given by the number in the element's name.

These elements represent <https://html.spec.whatwg.org/multipage/dom.html#represents> headings. The lower a heading <https://html.spec.whatwg.org/multipage/sections.html#concept-heading>'s heading level <https://html.spec.whatwg.org/multipage/sections.html#heading-level> is, the fewer ancestor sections the heading <https://html.spec.whatwg.org/multipage/sections.html#concept-heading> has.

The outline is all headings <https://html.spec.whatwg.org/multipage/sections.html#concept-heading> in a document, in tree order <https://dom.spec.whatwg.org/#concept-tree-order>.

The outline <https://html.spec.whatwg.org/multipage/sections.html#outline> should be used for generating document outlines, for example when generating tables of contents. When creating an interactive table of contents, entries should jump the user to the relevant heading <https://html.spec.whatwg.org/multipage/sections.html#concept-heading>.

If a document has one or more headings <https://html.spec.whatwg.org/multipage/sections.html#concept-heading>, at least a single heading <https://html.spec.whatwg.org/multipage/sections.html#concept-heading> within the outline <https://html.spec.whatwg.org/multipage/sections.html#outline> should have a heading level <https://html.spec.whatwg.org/multipage/sections.html#heading-level> of 1.

Each heading <https://html.spec.whatwg.org/multipage/sections.html#concept-heading> following another heading <https://html.spec.whatwg.org/multipage/sections.html#concept-heading> lead in the outline <https://html.spec.whatwg.org/multipage/sections.html#outline> must have a heading level <https://html.spec.whatwg.org/multipage/sections.html#heading-level> that is less than, equal to, or 1 greater than lead's heading level <https://html.spec.whatwg.org/multipage/sections.html#heading-level>.



5.3.6 Sections and headings <https://html.spec.whatwg.org/multipage/rendering.html#sections-and-headings>
@namespace url(http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml>);

article, aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section {
  display: block;
}

h1 { margin-block-start: 0.67em; margin-block-end: 0.67em; font-size: 2.00em; font-weight: bold; }
h2 { margin-block-start: 0.83em; margin-block-end: 0.83em; font-size: 1.50em; font-weight: bold; }
h3 { margin-block-start: 1.00em; margin-block-end: 1.00em; font-size: 1.17em; font-weight: bold; }
h4 { margin-block-start: 1.33em; margin-block-end: 1.33em; font-size: 1.00em; font-weight: bold; }
h5 { margin-block-start: 1.67em; margin-block-end: 1.67em; font-size: 0.83em; font-weight: bold; }
h6 { margin-block-start: 2.33em; margin-block-end: 2.33em; font-size: 0.67em; font-weight: bold; }
In the following CSS block, x is shorthand for the following selector: :is(article, aside, nav, section)

@namespace url(http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml>);

x h1 { margin-block-start: 0.83em; margin-block-end: 0.83em; font-size: 1.50em; }
x x h1 { margin-block-start: 1.00em; margin-block-end: 1.00em; font-size: 1.17em; }
x x x h1 { margin-block-start: 1.33em; margin-block-end: 1.33em; font-size: 1.00em; }
x x x x h1 { margin-block-start: 1.67em; margin-block-end: 1.67em; font-size: 0.83em; }
x x x x x h1 { margin-block-start: 2.33em; margin-block-end: 2.33em; font-size: 0.67em; }
The shorthand is used to keep this block at least mildly readable.





> On Oct 12, 2022, at 11:00 AM, Bruce Bailey <notifications@github.com <mailto:notifications@github.com>> wrote:
> 
> 
> I do not agree that the spec as written disallows skipping heading levels.
> 
> It it meant to say that, it could just say something much simpler. Instead, it is the more complicated heading lead and the context of Outline. Has @domenic <https://github.com/domenic> said it means no skipping levels?
> 
> —
> Reply to this email directly, view it on GitHub <https://github.com/w3c/wcag/discussions/2722#discussioncomment-3863130>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACNGDXRNFUSJJZHJCDVIU3DWC34EBANCNFSM6AAAAAARBUAINM>.
> You are receiving this because you commented.
> 

Received on Wednesday, 12 October 2022 21:04:14 UTC