Skip to content

a11y: duplicate banner landmark from #quarto-header and #title-block-header #14375

Open

Description

@cderv

Reported in #14373 via axe-core scan of a minimal Quarto website.

Repro: https://github.com/alexpghayes/quarto-accessibility-reprex

axe rule: landmark-no-duplicate-banner · impact: moderate · tag: best-practice
Target: <header id="quarto-header" class="headroom fixed-top quarto-banner ...">

The Quarto HTML template renders two top-level <header> elements: <header id="quarto-header"> for the navbar and <header id="title-block-header"> for the title block. Each implicitly carries role="banner", producing two banner landmarks on the same page. axe-core flags this as ambiguous for assistive tech.

This also drives landmark-unique for #quarto-header — splitting into a separate issue because the fix paths differ (restructure title-block placement vs label the navigation).

Part of #8706.

Activity

  1. added
    bugSomething isn't working
    themesRelated to HTML theming or any other style related issue (like highlight-style)
    on Apr 17, 2026
  2. cwickham commented on Sep 1, 2026

    @cwickham
    Member

    The duplicate here comes from title-block-banner: true, which the repro sets on index.qmd. The title-block post-processor moves the header out of #quarto-content, which takes it out of <main>:

    if (banner || manuscriptTitle) {
    // Move the header above the content
    const headerEl = doc.getElementById("title-block-header");
    const contentEl = doc.getElementById("quarto-content");
    if (contentEl && headerEl) {
    headerEl.remove();
    contentEl.parentElement?.insertBefore(headerEl, contentEl);
    }

    The same branch runs for title-block-style: manuscript.

    Since #title-block-header is a <header>, it computes as a banner whenever it is not inside <main>. #quarto-header is always a banner, so the duplicate arises whenever the title block ends up outside <main>. #14605 and #14839 are the same problem through different code paths.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilitybugSomething isn't workingthemesRelated to HTML theming or any other style related issue (like highlight-style)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions