Skip to content

fix(ui): give the remaining pages a main landmark - #1591

Closed
culfin wants to merge 1 commit into
apache:mainfrom
Besser-Sehen-Landshut:fix/landmark-plain-layout
Closed

fix(ui): give the remaining pages a main landmark#1591
culfin wants to merge 1 commit into
apache:mainfrom
Besser-Sehen-Landshut:fix/landmark-plain-layout

Conversation

@culfin

@culfin culfin commented Aug 24, 2026

Copy link
Copy Markdown

Third and last follow-up to #1587 (after #1589 for the admin area). Nineteen
routes hang straight off pages/Layout with no layout of their own — signing
in, registering, recovering an account, confirming an address, and the error
pages. They were the ones left without a landmark.

pages/Layout itself is the wrong place to add one: it wraps the header, so a
main there would put the navigation inside the content region, and "skip to
content" would land before it rather than after.

The change

A pathless layout route that is nothing but a main:

const Index: FC = () => (
  <main>
    <Outlet />
  </main>
);

Three of them, one per stretch of such routes, so every path, guard and index
stays exactly where it was.

Verified structurally: 88 paths before, the same 88 after, no page removed,
three layout nodes added.

The diff looks larger than it is. Read with git diff -w:

 ui/src/pages/PlainLayout/index.tsx | 43 ++++++++++++
 ui/src/router/routes.ts            | 24 +++++++

24 added lines in the router — three eight-line wrappers. Everything else is
one indentation level.

Verified by running it

Built the front end and stepped through the affected routes in a browser:

route <main> renders
/users/login 1 "Welcome to Answer"
/users/register 1 "Welcome to Answer"
/50x 1 the error page
unknown path 1 the 404 page

The console errors in that run come from the API being absent in a static
build — custom.css is served by the Go side, not by the bundle.

With this, #1587, #1589 and this one together, every route of the interface
sits inside exactly one main.

🤖 Generated with Claude Code

Third and last follow-up to apache#1587. Nineteen routes hang straight off
`pages/Layout` with no layout of their own — signing in, registering,
recovering an account, confirming an address, and the error pages. They were
the ones left without a landmark.

`pages/Layout` itself is the wrong place for it: it wraps the header, so a
`main` there would put the navigation inside the content region and "skip to
content" would land before it.

Instead, a pathless layout route that is nothing but a `main`. Three of them,
one per stretch of such routes, so every path, guard and index stays exactly
where it was — verified: 88 paths before, the same 88 after, no page removed.

The diff looks larger than it is. Read with `git diff -w` it is 24 added lines
in routes.ts; everything else is one indentation level.

Checked by building the front end and stepping through the affected routes in
a browser: /users/login, /users/register, /50x and an unknown path each render
inside exactly one `main` and draw their content. (The console errors in that
run come from the API being absent in a static build — `custom.css` is served
by the Go side.)

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

culfin commented Aug 24, 2026

Copy link
Copy Markdown
Author

Folded into #1587, which now covers every route rather than a third of them. Nothing is dropped; the commits are on that branch. Closing to keep the queue readable.

@culfin culfin closed this 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