Skip to content

Incorrect heading level order #48

Closed

Description

@carolinan

As part of the accessibility-ready testing, 'Headings with meaningful structure' we need to check if the heading structure follows a logical nested order.
https://wpaccessibility.org/docs/topics/theme-guidelines/headings-structure/

Without reviewing the code closely, the H1 heading level seems to be missing on:
index, single post, single page, page with sidebar.
This is a failure of "Verify that an H1 element is present on the page."

The index will need a heading above the list of posts, but it can be visually hidden.

Single post:
In the "Keep Reading" pattern, which is placed on the single post template, the heading levels skip from H2 to H5.

Single page with sidebar, single post with sidebar:
In the sidebar recent post display the headings skip from H2 to H5.

In hindsight, it would have been faster to let codex or a similar tool review the code itself for the missing levels and only do manual testing afterwards.

Activity

  1. added theissue type on Sep 17, 2026
  2. carolinan commented on Sep 18, 2026

    @carolinan
    ContributorAuthor

    The overview from Claude:

    Template Pattern Has h1?
    404.html 404.php ✅ <h1> via wp:heading {"level":1}
    index.html index.php ❌ No h1 found
    index-sidebar.html index-sidebar.php ❌ No h1 found
    page.html page.php ❌ No h1 found
    page-sidebar.html page-sidebar.php ❌ No h1 found
    search.html search.php ❌ No h1 found
    single.html single.php ❌ No h1 found
    single-sidebar.html single-sidebar.php ❌ No h1 found
    archive.html archive.php ❌ No h1 found
    archive-sidebar.html archive-sidebar.php ❌ No h1 found
  3. added
    [Focus] Accessibility (a11y)
    on Oct 2, 2026
  4. huzaifaalmesbah commented on Oct 5, 2026

    @huzaifaalmesbah
    Member

    I audited current trunk on a local environment and confirmed all heading hierarchy issues listed here are now resolved:

    • Missing H1s: Resolved across templates — Index uses visually hidden <h1>Posts</h1> (#69), Single/Page titles are H1 (#64, #65, #66), and Archive/Search use query-title (H1).
    • Heading skips: Resolved in #96 — both "Keep Reading" and the Sidebar now follow a clean H2 (section label) → H3 (post title) structure without skipping levels.
    • Overlay: Navigation title was changed to H2 (#103, #109), preventing duplicate H1s.

    The heading structure is sequential across all templates now. I believe this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Focus] Accessibility (a11y)

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions