WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: ARIA heading - hierarchy and screen readers

for

From: Duff Johnson
Date: Apr 9, 2015 7:32AM


> On Wed, Apr 08, 2015 at 02:55:28PM -0400, Duff Johnson wrote:
>> "Importance" is far from synonymous with "heading". Want to use a semantic tag for this purpose? Use <strong> instead.
>
> But strong has zero meaning to any UA.

Implementation is - of course - another matter, but the meaning of <strong> is clearly defined in the specification.

Consider: what's the better outcome?

- Everyone continues to ignore <strong> (or treat it as a mere styling point) and the world stays with inconsistent hacks that violate the spirit (if not the letter) of WCAG 2.0, negates the richness of the format, and forces AT users to remain as 2nd class consumers… or

- People start to pay attention to the specification, and thus finally move the accessibility subject past its tiny cabal of activists and into the mainstream.

> It styles stuff a bit bolder.

<strong> doesn't "style" at all. The world of content is not defined by browser defaults.

…or are you next going to tell me that content within an <a href> tag "is" underlined?

> For any user it's no different from adding a class of "heading" and
> styling to taste.

Back to the classic confusion between semantics and style…

<strong> is a perfectly reasonable semantic tag. If developers fail to take the specification seriously because of a deep, unrelating HTML4 hangover… who's fault is that?

The the (correct) use of <strong> would make it easy for AT users to locate items the author deemed of critical importance without confusing the matter with sections and headings.

But of course, if one ignores the specification, and simply considers <strong> as a styling cue, then you won't see any value, won't leverage the richness and your AT users will still be 2nd class consumers.

One should, I think, not spend too much energy defending and facilitating the tendency of web-developers to serve slop.

>> Note that HTML5 (and PDF, for that matter) is clear on this exact question: Heading tags are about sections - ***not*** importance.
>>
> Which is too bad, because most HTML pages are *nothing* like school
> paper documents: usually the h1 and the main content are after all
> the "page stuff". Especially e-commerce: you almost always have headings
> before the h1, meaning you cannot use school-paper structure and have
> headings going from h1 to h2 to h3, etc.

No-one said web-pages are "like" paper documents… I'm with you there!

> What almost every web page has today is a "site" set of information,
> and a unique "page" set of information. These actually usually need
> completely different heading levels, but because we're still using
> a "single document" idea, we munge it all together instead.

Leaving aside certain eccentricities (for the moment)… HTML5's <section> model and/or ARIA roles addresses this, does it not?

> Either that, or you must stop using headings before sections like
> nagivation sections, column headings, etc. These are more often before
> the main content and h1 than other way around.

You must simply use the format according to its specification, and educate others to do the same.

Fail to do that and you are tossing consistent accessibility (and the chance of it becoming widespread) down the rat-hole.

> Once upon a time we devs used to use a brittle, magical CSS setup called
> "Holy Grail" where the page was divided into columns and the main column
> was placed first in source. The other two were wrapped around using
> convoluted floats and negative margins. Granted, everyone did this to
> please the SEO voodoo cultists rather than for accessibility reasons,
> but it was often toted as a "win-win" for both.
>
> I haven't seen a Holy Grail layout in a few years now.

Hacks either eventually die or become part of the specification… In this case it looks (sort of) like the latter - now HTML5 has <section> to meet this need. :-)

Duff.