Skip to content

Fix heading-level skips on seven documentation pages - #2346

Open
AAliKKhan wants to merge 1 commit into
google:mainfrom
AAliKKhan:fix/heading-hierarchy-skips
Open

AAliKKhan wants to merge 1 commit into
google:mainfrom
AAliKKhan:fix/heading-hierarchy-skips

Conversation

@AAliKKhan

Copy link
Copy Markdown
Contributor

What

Seven pages skip heading levels. 24 headings are promoted one level so every
page follows h1 -> h2 -> h3 with no gaps.

File Lines Change
docs/agents/workflow-agents/loop-agents.md 25, 35, 49 ### -> ##
docs/agents/workflow-agents/parallel-agents.md 32, 40, 50 ### -> ##
docs/agents/workflow-agents/sequential-agents.md 25, 32, 47 ### -> ##
docs/deploy/agent-runtime/agents-cli.md 33, 58, 112, 143, 185 ### -> ##
docs/optimize/index.md 14 ### -> ##
docs/deploy/gke.md 577 #### -> ###
docs/evaluate/criteria.md 51, 81, 101, 163, 682, 688, 699, 723 #### -> ###

Why

  • loop/parallel/sequential-agents.md - each page goes h1 then
    straight to three h3 sections. All three sections are peers and are the
    page's top-level sections, so all three become h2.
  • agents-cli.md - five h3 sections appear before the h2
    "Test deployed agents", so the outline implies the deployment steps are
    subsections of a section that appears after them.
  • optimize/index.md - the page opens with ### Definitions followed by
    ## Example.
  • deploy/gke.md - #### Prerequisites sits directly under ## Option 2: Automated Deployment, skipping h3.
  • evaluate/criteria.md - two criteria use #### for their four
    sub-sections while every other criterion on the page (and every other
    criterion added later in the same file) uses ###. Both blocks are fixed,
    not just the first heading of each.

Skipped levels break the document outline: screen readers and the in-page
"On this page" table of contents are supposed to nest one level at a time,
and the toc extension's maxdepth handling assumes they do.

Verification

  • A repo-wide outline scan (fences stripped, all 243 non-API-reference pages)
    reports zero h(n) -> h(n+2) jumps after the change; before it, it
    reported the eight first-jump sites above plus their continuation headings.
  • Heading anchors are derived from heading text, not level, so no slug
    changes. The two explicit {#...} anchors on agents-cli.md
    ({#prerequisites-ad}, {#prepare-ad}, {#connect-ad}, {#deploy-ad},
    {#adk-agents-cli-changes}) are preserved verbatim, and no page has two
    headings with the same text, so no slug collisions are introduced.
  • mkdocs build --strict passes.

@netlify

netlify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit baf9653
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/6ad6044eefad1a293b3e5a6b
😎 Deploy Preview https://deploy-preview-2346--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Seven pages skipped heading levels, which breaks the document outline
for screen-reader users and in-page navigation:

* agents/workflow-agents/{loop,parallel,sequential}-agents.md went
  straight from the page h1 to h3, and every section on those pages is
  a top-level section, so all of their h3s become h2s.
* deploy/agent-runtime/agents-cli.md had five h3 sections before an h2
  ("Test deployed agents"), inverting the page order.
* optimize/index.md opened with "Definitions" as an h3 before an h2.
* deploy/gke.md used h4 for "Prerequisites" under an h2.
* evaluate/criteria.md used h4 for the four sub-sections of both
  "tool_trajectory_avg_score" and "per_turn_user_simulator_quality_v1"
  while every other criterion uses h3.

Heading anchors are derived from heading text, not from heading level,
and the two explicit {#...} anchors on the agents-cli page are kept, so
no in-page or inbound links change. A repo-wide outline scan now reports
zero heading-level skips.
@AAliKKhan
AAliKKhan force-pushed the fix/heading-hierarchy-skips branch from 7f24817 to baf9653 Compare October 19, 2026 11:51

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant