WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Query on heading hierarchy

for

From: Duff Johnson
Date: Mar 20, 2018 1:39PM


You have put your finger on the issue. When the unambiguous utilization of heading-levels requires awareness of a "situation" we can already smell a problem.

If you have reason to believe that the document is "properly structured" (i.e., no skips), then h2 following h3 would invariably mean that the h2 content just happens to follow h3 content - no ambiguity.

If it's not a "good tree" to begin with (i.e., there are skips for whatever reason), then ambiguity is baked-in (with exceptions for some specific cases).

In general, if skipping is acceptable, then it's impossible to assess an apparent h2 following an h3. Maybe the h2 somehow belongs to the h3? Maybe not! You can't tell.

It's a mistake to overload "headings" with the idea of "visual emphasis" in any event. Consider an operating manual. Alerts in the manual may be styled with a high degree of visual emphasis, but that does not imply a high heading level.

HTML is a lousy way to think about semantics. But, since HTML pervades the way we think, it seems, authors should be required to use proper heading structures. Just don't use a technology standard to insist on the point; use a content standard instead.

Duff.


> On Mar 20, 2018, at 14:52, glen walker < <EMAIL REMOVED> > wrote:
>
> An h2 immediately following an h3 is likely to be an issue, but not
> necessarily. It all depends, of course, on the situation. It could be
> that the h2 just happens to follow the h3 in the DOM and the two are
> unrelated. That would be ok. However, if the h2 is a subsection of h3,
> then that would be confusing.
>
> Glen
>
>
> On Tue, Mar 20, 2018 at 12:12 PM, Wolfgang Berndorfer <
> <EMAIL REMOVED> > wrote:
>
>> You'll agree that we have to examine such constructions for potential
>> missuse of markup to highlight visually. Especially if the H2-element
>> follows the H3 immediatelly, it smells likely as abuse. And this would
>> affect 1.3.1. Right?
>>
>> Wolfgang
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: WebAIM-Forum [mailto: <EMAIL REMOVED> ] Im Auftrag
>> von glen walker
>> Gesendet: Dienstag, 20. März 2018 15:29
>> An: WebAIM Discussion List
>> Betreff: Re: [WebAIM] Query on heading hierarchy
>>
>> +1 to Birkir. The purpose of the guideline is to make sure the semantic
>> heading levels match the visual presentation. It doesn't say it has to be
>> h1 followed by h2 followed by h3. While that's certainly ideal, there are
>> lots of situations where it makes sense to skip a level.
>>
>> On Tue, Mar 20, 2018 at 2:39 AM, Birkir R. Gunnarsson <
>> <EMAIL REMOVED> > wrote:
>>
>>> All that WCAG 1.3.1 requires is that semantic information mirrors
>>> visual information.
>>> If you have a largest heading followed by a small heading followed by
>>> a heading that looks somewhere in the middle, marking the first as h1,
>>> and the others as h2 is misleading, it does not reflect their visual
>>> weight, but marking the first has h1, then h3 and h2 would reflect
>>> their visual emphasis and comply with WCAG 1.3.1.
>>>
>>> So the first step is to make sure the heading levels mirror the visual
>>> weight of the headings on the page.
>>> An ideal step would be to ensure that both visual weight and heading
>>> level correctly describes the content structure, but my reading of
>>> WCAG 1.3.1 does not show me that this is required.
>>> Maybe my view goes against the popular view, but I think there are
>>> plenty of situations where an h1 can be followed by an h3 and then h2.
>>>
>>> WE often have content with a main heading, a small subsection or note
>>> with no descendants and then categories.
>>> Think of a page of bank accounts.
>>> The main heading is "your accounts".
>>> It could be followed by a small section such as "quick overview" or
>>> "your transactions in the last 24 hours".
>>>
>>> Then you have headings for credit card accounts, checking accounts and
>>> other accounts, inside those you have headings for individual accounts
>>> within those categories.
>>>
>>> I think the structure that best describes this is to have the heading
>>> of the small section an h3 or h4, the heading of account categories as
>>> h2s and headings for individual accounts h3s.
>>> The section at the top does not have its own subsection, and it takes
>>> up a small area of the page. I think marking it as an h2 does not
>>> describe the way the page is structured.
>>>
>>>
>>>
>>>
>>> On 3/20/18, Osmo Saarikumpu < <EMAIL REMOVED> > wrote:
>>>> On 20/03/2018 09:01, Vemaarapu Venkatesh wrote:
>>>>> Can we say that the heading hierarchy is maintained if h1 is followed
>> by
>>>>> h3's directly skipping h2's. Will this comply with WCAG 2.0.
>>>>
>>>> At least I can't think of a situation where a h3 would be justified
>>>> without a preceding h2. See e.g.:
>>>>
>>>> https://webaim.org/techniques/semanticstructure/#contentstructure
>>>>
>>>> --
>>>> Best wishes, Osmo
>>>> >>>> >>>> >>>> >>>>
>>>
>>>
>>> --
>>> Work hard. Have fun. Make history.
>>> >>> >>> >>> >>>
>> >> >> >> >>
>> >> >> >> >>
> > > >