Skip to content

fix(ui): give the pages a heading hierarchy - #1588

Open
culfin wants to merge 2 commits into
apache:devfrom
Besser-Sehen-Landshut:fix/heading-hierarchy-question-list
Open

fix(ui): give the pages a heading hierarchy#1588
culfin wants to merge 2 commits into
apache:devfrom
Besser-Sehen-Landshut:fix/heading-hierarchy-question-list

Conversation

@culfin

@culfin culfin commented Aug 24, 2026

Copy link
Copy Markdown

The question list heading and every entry in it are both h5, and most pages
have no h1 at all.

Visible on this project's own instance

$ curl -s -A "…Googlebot…" https://meta.answer.dev/questions | grep -c "<h1"
0

And in the source, one h1 in the entire interface — on the question detail
page:

$ grep -rn "<h1" ui/src | wc -l
1

Why it matters

Jumping by heading is one of the two ways people who do not see the page move
around it. With the list heading and its entries on the same level, that walk
is a flat list where a structure was meant; with no h1, there is nothing that
names the page. WCAG 1.3.1.

The change

where before after
QuestionList heading, source === "questions" h5 h1
QuestionList heading, elsewhere h5 h2
QuestionList entries h5 h3
Tags/Detail, Questions/Linked page titles h3 h1
Tags, Users, Badges page titles h3 h1
Users groups (h6), Badges groups (h5) h2

source === "questions" is the one place where this heading names the page;
the others bring their own title above it.

fs-5, fs-3 and fs-6 carry the sizes the old tags had, so nothing
changes on screen
. Checked with prettier, eslint and tsc.

Still open

The settings pages and the search results have no heading at all — not a wrong
level, none. Adding one means choosing wording and an i18n key across 45
language files, a different kind of decision than renaming a tag.

Supersedes #1590, which was the second half of this work as a separate pull
request.

🤖 Generated with Claude Code

The list heading and every entry in it were both `h5`:

    <h5 className="fs-5 text-nowrap mb-3 mb-md-0">   ← "All Questions"
    <h5 className="text-wrap text-break">            ← every question title

Same level, so nothing tells a screen reader which of them names the page and
which are its entries. Jumping by heading walks a flat list where a structure
was meant. And `/questions` — the busiest page of the forum — had no `h1` at
all; `grep "<h1" ui/src` finds exactly one across the whole interface, on the
question detail page.

- The list heading is `h1` where it names the page (`source === "questions"`,
  the only place with no other heading above it) and `h2` everywhere else.
- Entries drop to `h3`, one level below.
- The two pages that embed the list and titled themselves `h3` — tag detail
  and linked questions — become `h1`.

`fs-5` and `fs-3` carry the sizes the tags had before, so nothing changes on
screen. Verified with prettier, eslint and tsc.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Three more pages carry their title as `h3` and have no `h1` at all. The groups
below them jump further than one level — `h6` on the user page, `h5` on the
badge page — so they become `h2`.

`fs-3`, `fs-6` and `fs-5` carry the sizes the old tags had, so nothing changes
on screen.

Still without any heading, and therefore not in here: the settings pages and
the search results. Those need wording and an i18n key, which is a different
kind of decision than renaming a tag.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@culfin
culfin changed the base branch from main to dev August 24, 2026 18:00
@culfin culfin changed the title fix(ui): give the question list a heading hierarchy fix(ui): give the pages a heading hierarchy Aug 24, 2026
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