E-mail List Archives

Re: page should contain no more than two h1 elements


From: Jared Smith
Date: Jun 15, 2009 12:35PM

On Mon, Jun 15, 2009 at 11:52 AM, Karl Groves wrote:

> This begs the question: What is the actual harm done to end users if
> multiple H1s are presented in a document?  (Barring, of course, the misuse
> of them because they're out of order).

If it's fairly typical for pages to have one h1, a screen reader or
keyboard user could employ the technique of pressing the 1 key to
navigate to the first h1 on the page to determine what the page is
about. If there is more than one h1 (or arguably, if the site title or
logo is the first h1), this technique doesn't work very well. It's
quite possible that the user could then begin searching for h2's and
thus entirely miss the actual main content title.

For these reasons, and others, I think it's best to have one h1 per
page and that the main document title be that h1, even if this means
that the h1 is not the first heading within the web page. Does this
mean that the page is "inaccessible" if it doesn't do this? Absolutely
not, but I do think that this is the optimal structure for keyboard
accessibility and for document semantics.

If a document truly has more than one document title, then certainly
more than one h1 makes sense. This is rare though - perhaps a document
that contains both an English and Spanish version of the content with
h1's designating each section, for example.