SIGN IN SIGN UP

fix(a11y): distinct tab titles per route, html lang that follows the locale, no nested main (#14629)

* fix(a11y): distinct tab titles per route, html lang that follows the locale, no nested main

Only the shared playground set a document title, so every other route showed
the generic "Langflow" and was indistinguishable in tabs, history and AT
window lists. index.html hard-codes lang="en" and nothing synced it to the
active locale, so the six translated locales were announced with English
pronunciation rules. Two modals rendered their own <main> on top of the
page's, nesting a second main landmark.

Adds a useDocumentTitle hook wired into every route (reusing the string each
page already renders as its heading), syncs documentElement.lang on i18n init
and languageChanged, and turns the two modal <main> elements into <div>.

* fix(a11y): title the home page after the active tab, not the route

Flows and Deployments share /flows and only differ by the selected header
tab, and the header force-selects Flows on /components when MCP is on. Keying
the title on the route prop let the tab title disagree with the visible page;
keying it on the live flowType state cannot.
V
Viktor Avelino committed
ad784222111eb54e59ff7c3fe1f22930b5d34e83
Parent: e12b340
Committed by GitHub <noreply@github.com> on 8/18/2026, 10:49:12 PM