Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H42 missing appropriate hierarchical level condition #655

Closed
goetsu opened this issue Mar 11, 2019 · 11 comments
Closed

H42 missing appropriate hierarchical level condition #655

goetsu opened this issue Mar 11, 2019 · 11 comments

Comments

@goetsu
Copy link

goetsu commented Mar 11, 2019

Test procedure of technique H42 https://www.w3.org/TR/WCAG20-TECHS/H42.html
check :

  1. Check that heading markup is used when content is a heading.
  2. Check that heading markup is not used when content is not a heading.

test procedure of technique ARIA12 https://www.w3.org/TR/WCAG20-TECHS/ARIA12.html check :

  1. Examine each element with the attribute role="heading".
  2. Determine whether the content of the element is appropriate as a heading.
  3. If the element has an aria-level attribute, determine whether the value is the appropriate hierarchical level.

The third condition used in ARIA12 is missing on H42 I propose to update it like :

  1. Check that heading markup is used when content is a heading.
  2. Check that heading markup is not used when content is not a heading.
  3. Check if the appropriate hierarchical level is used.

Expected Results
Checks #1, #2 and #3 are true.

@DavidMacDonald
Copy link
Contributor

Currently correct hierarchical nesting is a best practise but not a WCAG failure. That was carefully negotiated during the creation of WCAG 2.0 by companies that have content coming from many sources who could not guarantee hierarchy, and at the time many screen reader users just press H. H, H to move through headings, or pulled up a list of headings without specific concern about the level.

@goetsu
Copy link
Author

goetsu commented Mar 18, 2019

@DavidMacDonald thanks for your comment. In that case why is it required for ARIA12 ?

We are currently updating the french government web accessibility testing methodology (RGAA). Until now this testing methodology require to use correct hierarchical nesting so we need to have some sort of official position of the working group on this subject to be able to decide to drop it or not.

@patrickhlauke
Copy link
Member

having a slightly incorrect level, skipping levels, etc is to me, at best, a "soft" failure. nobody dies if a site goes from <h1> to <h3> with no <h2>s, for instance.

arguably, even the ARIA technique only talks about "appropriate" levels, without defining what "appropriate" means. does it allow skipping? having more than one <h1> (which some people argue is a bad thing).

oddly, i've been harsher on sites that jump "up" in the hierarchy, so having a sub-heading, or heading for a sub-section, be of a higher hierarchical level than it should be.

but overall, WCAG is quite vague/handwavy in defining exactly what the most appropriate structure is in every situation, and as ever techniques are only informative, not normative...

@goetsu
Copy link
Author

goetsu commented Mar 18, 2019

@patrickhlauke yes impact for user may be low but it's not the question here and yes I know techniques and failure are informative only but it look strange to have this condition on ARIA12 and not on H42.

If the working group agree that incorrect hierarchical nesting isn't required by wcag in that case third condition of ARIA12 need to be remove otherwise at least similar condition need to be added to H42 for consistency.

@patrickhlauke
Copy link
Member

my point there was that because techniques are informative, it's not correct to say that WCAG "requires" anything. agree that for consistency, it would be good to get it to match up with the other technique and not suggest some kind of requirement/need that isn't normatively there...

@awkawk
Copy link
Member

awkawk commented Mar 19, 2019

@patrickhlauke I wouldn't even call it a soft failure, it is not a failure. However, I do think that 1.3.1 requires that the headings are appropriate for the content. WCAG doesn't require a strict hierarchy, so as long as someone can justify a heading structure like:

h1
h2
h3
h3
h4
h5
h2
h3
h5

... then there won't be a failure even though the H4 is skipped.

This is a sufficient technique, so we can show the best practice and we can also add a check for the headings to be at the "appropriate" level, which provides all of the wiggle room that I indicate as needed above.

@patrickhlauke
Copy link
Member

as long as someone can justify a heading structure like

what justification could they have though? other than a technical one, i mean. but agree, "appropriate" is wooly enough, though i guarantee that will just lead to discussions about "what do they mean by 'appropriate' ?"

@goetsu
Copy link
Author

goetsu commented Mar 22, 2019

@awkawk same question as @patrickhlauke what justification could they have though?

Using "appropriate" on both techniques is more consistent for sure. Nevertheless for me if working group don't consider hierarchy with incorrect nesting as a failure of 1.3.1 (or any other SC) then I think either :

  • both techniques associated to 1.3.1 must not ask to use appropriate level at all.
  • appropriate need to be clearly defined/illustrated with example

@alastc
Copy link
Contributor

alastc commented Mar 25, 2019

The non-heirarchical (sort of) structure that's quite common is where you have a need for headings above an H1.

E.g.

H2 Site-section menu
H1 Page title heading
H2 section
H3 sub-section etc.

To me that's "appropriate" without being strictly heirarchical.

@goetsu
Copy link
Author

goetsu commented Mar 25, 2019

@alastc this example is already covered as an example in H42 (see "Example 2: Headings in a 3-column layout").

If we consider a case like

<h1>Brand x</h1>
  <div>
    <h2>News</h2>
    <article>
      <h3>Article 1 title</h3>
      <p>...</p>
   </article>
   <article>
     <h3>Article 2 title</h3>
     <p>...</p>
  </article>
</div>
<div>
  <article>
    <h4>event 1 title</h4>
    <p>...</p>
  </article
  <article>
    <h4>event 2 title</h4>
    <p>...</p>
  </article>
</div>

if I understand correctly what @DavidMacDonald @awkawk
and @patrickhlauke said they will you not consider the h4 in the second div as a failure of SC 1.3.1 (same if h1, h3, h5 or h6 was used instead of h4)

@awkawk
Copy link
Member

awkawk commented Mar 26, 2019

Official WG Response: Thank you for the comment, we have added "appropriate" to H42 to align with ARIA12.

Agreed on March 26 call: https://www.w3.org/2019/03/26-ag-minutes.html#item09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants