Skip to content

fix(a11y): use h1 for the product title on product detail pages - #151

Open
PaulBratslavsky wants to merge 1 commit into
mainfrom
fix/product-heading-level
Open

fix(a11y): use h1 for the product title on product detail pages#151
PaulBratslavsky wants to merge 1 commit into
mainfrom
fix/product-heading-level

Conversation

@PaulBratslavsky

@PaulBratslavsky PaulBratslavsky commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Product detail pages rendered the product name as <h2>, leaving the page
with no <h1> at all. A page should have exactly one h1, and
screen-reader users navigate by it.

Draft for review — please do not merge yet.

The change

Two lines:

File Change
next/components/products/single-product.tsx:83 <h2><h1>
tanstack/src/components/products/single-product.tsx:78 <h2><h1>

Astro and Nuxt already used <h1> and are unchanged, so this also brings
all four frontends to the same heading structure.

Verified

Each frontend was run against the shared Strapi and its live product page
checked for exactly one h1 carrying the product name:

Frontend h1 count Content
Next 1 Analytics Insight Pack
Astro 1 Analytics Insight Pack
Nuxt 1 Analytics Insight Pack
TanStack 1 Analytics Insight Pack

Before this change, Next and TanStack each returned h1 count = 0.

Note

next/components/products/single-product.tsx fails yarn check:format,
but it already does so on main — 23 files do. I left it alone rather
than bundle an unrelated reformat into a one-line fix.

Stacking

Targets feat/tanstack-frontend (#150), so the diff above is just this
fix. Merge #150 first — GitHub will retarget this PR to main
automatically once it does.

The product detail page rendered the product name as <h2> in Next and
TanStack, leaving those pages with no <h1> at all. A page should have
exactly one h1, and screen-reader users navigate by it.

Astro and Nuxt already used <h1>, so this also brings all four frontends
to the same heading structure.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
launch-pad Ready Ready Preview Sep 4, 2026 8:15pm UTC

Request Review

@PaulBratslavsky
PaulBratslavsky marked this pull request as ready for review September 4, 2026 20:15
@PaulBratslavsky
PaulBratslavsky changed the base branch from main to feat/tanstack-frontend September 4, 2026 20:17
@PaulBratslavsky
PaulBratslavsky changed the base branch from feat/tanstack-frontend to main September 9, 2026 15:35
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.

2 participants