Re: changed advice on use of h1 headings in document outline.

Hi again, Steve.

Yes, the deployment of headings is certainly a thorny issue, but perhaps we
can get to the bottom of it!

> As the primary practical concern is that the outline produced through the
use of headings alone is logical right?

Agreed: For backwards compatibility as well as assisted traversal through
screenreader heading dialogs. However, I would say that a logical use of
headings does not necessarily mean a top-down methodology starting from a
singular h1.

That is, h(n) followed by h(n+1) is logical if h(n+1) implies a subsection
belonging to h(n). This is structurally sound logic, regardless of the
value of "n" or how many occurences there are of it. However, "first to
appear" does not necessarily mean "most important". Structure is accounted
for, but not importance.

For example, on the Paciello Group page (view-source:
http://paciellogroup.com/), the _first_ heading is an <h2>. The reason for
this - correct me if I'm wrong - is that this <h2> marks up a navigation
block that is considered _less important_ than the content headed by the
following <h1>. This makes great sense to me, btw :-)

However, using http://gsnedders.html5.org/outliner/, the outline for this
looks like...

h2
h1

... not...

— h2
h1

Because the <h2> does not belong to anything, it is considered
_structurally_ akin to the following <h1>. They are considered to exist on
the same plain. The only difference - visually through conventional CSS or
by AT familiarity - is that the h1 can be perceived as more important. It's
sort of like we started off whispering, then reached a crescendo halfway
into a speech. Nothing wrong with that.

So far we've established that we can use h(n) to describe importance(n)
independent of document structure, plus it can even have positive effects
on accessibility: Users can easily skip any headings that are not <h1> to
get to the first instance of an <h1>, right?

But what about structure? This is important as well.

If we introduce a section like this...

<h2></h2>
    <section>
        <h1></h1>
    </section>

... we get a structural outcome like this:

h2
— h1

Now the subsection has a more "important" heading than its parent section,
but it isn't the importance part that is wrong; its the structure part:

By using a sectioning element to describe a subsection, we've defined a
relationship of belonging. The main page content now "belongs to" the
navigation block, which is wrong. It's right not to use a sectioning
element here because there's no new structural relationship to be defined.
At the same time, we don't want to reverse the heading levels because their
prescribed importance will change for the worse _as well as_ implying a
relationship of belonging. Doubly bad.

Taking all of this into consideration, I think there is a case to be made
that headings and sections have subtly different uses: Headings define
importance (but _imply_ structure when used in order) while sections define
structure (but _imply_ importance via their nesting level).

Author advice that suggests we should approach importance and structure
somewhat separately might be optimal.

What do you think?

Cheers - Heydon

Received on Friday, 15 February 2013 16:10:33 UTC