Skip to content

Organizer pages say lang="en" on <html> whatever the organizer's language #938

Closed

Description

@richshaw

Needs your OK: this makes the organizer pages' <html lang> follow the organizer's language, and the sign-in pages' follow the site's default language. Nothing changes while only English ships. Swap pipeline:proposed for pipeline:ready to have it built.

What happens

  • One attribute for every organizer page. Give the app three root layouts, and unmatched addresses a styled 404 #898 gives the app three root layouts. Its src/app/(organizer)/layout.tsx covers /app, /login and /oauth, and renders <RootShell lang="en">. (On the stack today there's still one root layout, src/app/layout.tsx, with <html lang="en">.)
  • It will disagree with the text. Once the app follows the organizer's language (The organizer app ignores the organizer's language #937), a page in another language still says lang="en". Screen readers pick their voice from it, and browser translation trusts it.
  • It can go stale. A root layout doesn't re-render on a client-side navigation. Saving the account language redirects within the same layout, so even a layout that read the language would keep the old one until a full page load.

Fix, in outline

  • (organizer)/layout.tsx passes a language to RootShell: the organizer's (the helper from The organizer app ignores the organizer's language #937) when signed in, and the site default when not (defaultFor('organizer', instanceDefaultLocale())), which is what the sign-in pages use.
  • OAuth consent sits under this layout and gets the organizer's language, as its text will.
  • Saving the account language ends in a full page load, so the attribute can't keep the old language. Check that signing in and out already do one.
  • A unit test of the layout's choice: signed in with a stored language, signed in with none, signed out with and without a site default.

Watch for

  • No new statement. The session read is cached per request (getOrganizerSession), and the page reads it anyway. Pages with no session (/login, the check and confirm pages) mustn't start loading one.
  • The OAuth error page isn't under this layout. It's a hand-written HTML string in src/oauth/provider.ts; the consent issue handles its lang.
  • Accessibility checks in each test language come with the organizer tests issue under Epic: OpenSignup in Swedish, and other languages after it #619, which covers this page attribute too.

Order

Built on the localization stack (top: #936); see #619. After #937 (the organizer's language helper), and after #898 (the root layouts) is on main or below this PR.

Gate

Auto. Every page still says en while only English ships, and nothing under src/app/login/ changes. If the PR has to touch sign-in code, it goes to the owner.

Done when

  • The organizer pages' <html lang> is the organizer's language when signed in, and the site default (else en) when not.
  • After saving the account language, the page's <html lang> is the new one without a manual reload.
  • The layout test above passes, and the existing e2e and a11y specs pass unchanged.
  • pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test and pnpm build && pnpm budgets pass.

Phase 2 of #619, from the owner's decisions of 14 and 15 November 2026 and a survey of the organizer code. Checked against the localization stack at 750e570 (top: #936) and #898's branch, neither on main yet.

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt

Activity

  1. added
    enhancement
    pipeline:ux
    on Nov 15, 2026
  2. added
    pipeline:working
    and removed on Nov 16, 2026
  3. richshaw commented on Nov 16, 2026

    @richshaw
    OwnerAuthor

    The owner approved building this in the orchestrating session (16 November 2026), along with the participant pages' <html lang> (#628) and the rest of the launch work under #619.

    I've moved it to pipeline:ready and claimed it (pipeline:working) for a builder in that session. #898's root layouts are on main now, so nothing blocks it.

    https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


    Generated by Claude Code

  4. self-assigned this
    on Nov 16, 2026
  5. removed
    pipeline:working
    on Nov 16, 2026
  6. removed
    pipeline:ux
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions