Location of h1 in HTML output

5 views
Skip to first unread message

Andrew Scholer

unread,
Jun 27, 2026, 11:44:39 AM (8 days ago) Jun 27
to PreTeXt accessibility
I am wondering if we are placing the h1 tag in web output around the correct content. 

Currently, we place the book/article title that is in the header in an h1. The main body content's first header is an h2.

Guidance seems to be that the h1 should uniquely identify the contents of the page. A common use pattern is to hit "h" on entering a page to try to get an idea of what it contains and skip to the content.

WebAIM specifically recommends:
A page should typically have only one first-level heading that describes the page's overall content (and should be similar to the page <title>). This <h1> is typically located at the beginning of the main content (optimally a <main> element). 

This means a site wide title/logos etc... in the header section should not be the h1. They might be an h2 or not a header at all. (See samples from WCAG and WebAIM sites below.)

Any thoughts from the accessibility community about our heading structure?


Current PreTeXt output - site banner is h1:
image.png

Sample from WCAG site - no hX used in the site banner:
image.png

Sample from WebAIM - site banner is an h2:
image.png

Andrew Scholer

unread,
Jun 30, 2026, 11:23:46 AM (5 days ago) Jun 30
to PreTeXt accessibility
Sorry, images disappeared. Here we go again...

Current PreTeXt output - site banner is h1:
image.png


Sample from WCAG site - no hX used in the site banner:
image.png


Sample from WebAIM - site banner is an h2:
image.png

Rob Beezer

unread,
Jul 2, 2026, 1:58:04 PM (3 days ago) Jul 2
to pretex...@googlegroups.com
> This means a site wide title/logos etc... in the header section should not be
the h1.

That makes sense to me. (Independent even of accessibility aspects.)

We start threading heading levels at 2 anyway (iirc), so a change in what H!
contains should not require a lot of re-jiggering.

Rob

On 6/27/26 08:44, Andrew Scholer wrote:
> I am wondering if we are placing the h1 tag in web output around the correct
> content.
>
> Currently, we place the book/article title that is in the header in an h1. The
> main body content's first header is an h2.
>
> Guidance seems to be that the h1 should uniquely identify the contents of the
> page. A common use pattern is to hit "h" on entering a page to try to get an
> idea of what it contains and skip to the content.
>
> WebAIM specifically recommends:
>
> A page should typically have only one first-level heading that describes the
> page's overall content (and should be similar to the page <title>). This
> <h1> is typically located at the beginning of the main content (optimally a
> <main> element).
>
>
> This means a site wide title/logos etc... in the header section should not be
> the h1. They might be an h2 or not a header at all. (See samples from WCAG and
> WebAIM sites below.)
>
> Any thoughts from the accessibility community about our heading structure?
>
>
> Current PreTeXt output - site banner is h1:
> image.png
>
> Sample from WCAG site - no hX used in the site banner:
> image.png
>
> Sample from WebAIM - site banner is an h2:
> image.png
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt accessibility" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-a11y...@googlegroups.com <mailto:pretext-
> a11y+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-a11y/
> e52d6881-5189-487a-ab2a-f1db64feeb22n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-a11y/e52d6881-5189-487a-ab2a-
> f1db64feeb22n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages