w3c / wcag3

WCAG 3
https://w3c.github.io/wcag3/guidelines/
Other
48 stars 11 forks source link

Section heading levels should be semantically nested #81

Open rachaelbradley opened 5 months ago

rachaelbradley commented 5 months ago

"There should also be an outcome(s) stating that section heading levels should be semantically nested, creating a hierarchical outline of the content. And that there should be only one h1 heading on each page, as h1 is reserved for introducing the main content/topic on each page, meaning that the h1 heading should also be the same or similar to the page title."

Issue submitted via public-agwg-comments email. Respond to email with update when addressed.

detlevhfischer commented 5 months ago

There should also be an outcome(s) stating that section heading levels should be semantically nested ... there should be only one h1 heading on each page, as h1 ... h1 heading should also be the same or similar to the page title.

Again, this seems far too prescriptive to become a set of requirements for passing this outcome.

  1. There are frequently situations where hierarchies skip a level due to differences in content of varying pages using (for good reason) the same CSS for headings across pages.
  2. The practice of including an overall site name in the page title means that in many cases, the page title and the h1 will diverge. There can be other reasons for such divergence, for example, if page headings are very long (and there is sometimes good reason for them to be long).

In sum, these things may all be good or best practice but should IMO not constitute a generic requirement of an outcome.

scottaohara commented 5 months ago

also agree with @detlevhfischer.

i could potentially seeing a harder requirement about heading level nesting in the scope of the primary content of the page (but even then, importing of third party content can throw a wrench into the best laid heading level plans.

but there are also times where web applications might 'creatively' use heading levels to provide consistent / easy access to specific sections or sub-sections of content on a page. For instance, reserving headings 1 to 4 for the primary content of the page, but levels 5 and 6 are specifically used to navigate to important supplemental areas of a web application. Or, for instance, using heading level 5 or 6 to allow someone to navigate between messages in a chat app (h5 for the user, h6 for the service agent).

These creative uses are often cited in testing (but either acknowledged as not meeting 'best practices' or incorrectly logged as failures), but in actual user studies, people have found these specific purposes for headings helpful for these unique contexts.

I'd much rather see any requirement around this be that use of headings and their semantic hierarchy is logical in context, and not create failures for use cases that buck general best practices but can actually benefit users on a case-by-case basis.