w3c / wcag

Web Content Accessibility Guidelines
https://w3c.github.io/wcag/guidelines/22/
Other
1.14k stars 257 forks source link

Addition about heading hierarchy / nesting in Understanding SC 4.1.1 #2776

Open cstrobbe opened 2 years ago

cstrobbe commented 2 years ago

One of the comments that sometimes comes up in discussions about the meaning of SC 4.1.1 is whether it requires "correct nesting of headings". This seems to stem from confusion about two types of nesting: the nesting of tags (which is covered by SC 4.1.1) and the hierarchy of headings, which is sometimes also described as "nesting". The following suggested addition to Understanding Success Criterion 4.1.1 is intended to address this confusion:

This success criterion is about parsing and does not require conformance to the complete set of semantic rules in a specification. Specifically, this success criterion does not require a proper hierarchy of headings such that all headings are preceded by a heading of the same, higher, or one lower. A proper hierarchy of headings is sometimes described as "proper nesting of headings", but "nesting" in this phrase does not refer to the type of nesting at the level of start and end tags that is intended by the success criterion.

I have attempted to word this suggestion in a way that should make it independent of the outcome of the Proposal to Rephrase Success Criterion 4.1.1, which has turned out to be controversial. This is why it avoids the terms "syntax" and "validation".

Credits: The proposal uses some wording that has been suggested to me by Gregg Vanderheiden, but feel free to blame me for anything you find wrong with it.

"The complete set of semantic rules in a specification" is something that goes beyond conformance to SC 4.1.1 because not all such rules can be expressed by most machine-readable languages that are used for validation. In other words, complete conformance to a specification typically goes beyond the rules that a validator can check.

Feel free to suggest improvements to the proposed text.

scottaohara commented 2 years ago

This looks like it’d be a good addition and would help mitigate people mixing up what “nesting” means in this context.

GreggVan commented 2 years ago

This might be a bit technical for some people - and doesnt answer their question if they don’t understand validation and what it includes or why it is important to accessibility (rather than good form).

A suggested addition to the UNDERSTANDING document. (Perhaps in addition to Christophe’s text)

NOTE 1: Questions have arisen as to whether this SC requires proper nesting of headings or nesting of headings as described in the specification. This SC, as suggested by its title, is only about what is necessary to parse the markup into a data structure. When it says " elements are nested according to their specifications" it is only referring to the syntax of nesting that is required for parsing (I.e the start and end tags). It does not relate to semantic nesting issues like the order or nesting of Headings. WCAG is silent about all other aspects of the specifications outside of those needed for proper parsing.

NOTE 2: This SC was included to address a problem that existed in the past when assistive technologies would directly parse markup. This is no longer true and the value of this SC has dropped as a result.

gregg


Gregg Vanderheiden @.***

On Nov 10, 2022, at 3:31 AM, Christophe Strobbe @.***> wrote:

One of the comments that sometimes comes up in discussions about the meaning of SC 4.1.1 is whether it requires "correct nesting of headings". This seems to stem from confusion about two types of nesting: the nesting of tags (which is covered by SC 4.1.1) and the hierarchy of headings, which is sometimes also described as "nesting". The following suggested addition to Understanding Success Criterion 4.1.1 is intended to address this confusion:

This success criterion is about parsing and does not require conformance to the complete set of semantic rules in a specification. Specifically, this success criterion does not require a proper hierarchy of headings such that all headings are preceded by a heading of the same, higher, or one lower. A proper hierarchy of headings is sometimes described as "proper nesting of headings", but "nesting" in this phrase does not refer to the type of nesting at the level of start and end tags that is intended by the success criterion.

I have attempted to word this suggestion in a way that should make it independent of the outcome of the Proposal to Rephrase Success Criterion 4.1.1 https://github.com/w3c/wcag/issues/2525, which has turned out to be controversial. This is why it avoids the terms "syntax" and "validation".

Credits: The proposal uses some wording that has been suggested to me by Gregg Vanderheiden, but feel free to blame me for anything you find wrong with it.

"The complete set of semantic rules in a specification" is something that goes beyond conformance to SC 4.1.1 because not all such rules can be expressed by most machine-readable languages that are used for validation. In other words, complete conformance to a specification typically goes beyond the rules that a validator can check.

Feel free to suggest improvements to the proposed text.

— Reply to this email directly, view it on GitHub https://github.com/w3c/wcag/issues/2776, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNGDXSG6GGZ7MWWRKQNXPDWHTMHPANCNFSM6AAAAAAR4OPRWQ. You are receiving this because you are subscribed to this thread.

patrickhlauke commented 2 years ago

i'm really confused about why some folks would call the various levels of headings, and what hierarchy they represent, "nesting" ... so to me this looks like a weird non-sequitur. but i suppose if it helps other folks, there's no harm in it.

cstrobbe commented 1 year ago

Since SC 4.1.1 has been declared obsolete in the WCAG 2.2 Candidate Recommendation Draft of 25 January 2023, is this issue still worth keeping open? Is this that is still worth adding to the understanding documents for WCAG 2.0 and/or WCAG 2.1?

JAWS-test commented 1 year ago

Is this that is still worth adding to the understanding documents for WCAG 2.0 and/or WCAG 2.1?

I think this is not so important and can be closed. But important for WCAG 2.0 and 2.1 is the clarification of what nesting of elements means, because many will still test with WCAG 2.0 or 2.1 for several years (national laws do not update quickly and automatically to WCAG 2.2)