Replace vue-meta with a core page title mechanism
Overview
Kolibri sets page titles with vue-meta's metaInfo option, which only works in the Options API, in 61 components. CoachAppBarPage, CoachImmersivePage, TopicsContentPage and UserAuthLayout each keep their own copy of the " - Kolibri" suffix and the error-page title, so Device, Facility and Profile pages have no suffix. Coach builds its titles from route.meta.titleParts, which logs errors when you navigate away from a lesson you just deleted (#11291). vue-meta's Vue 3 line never got past 3.0.0-alpha.10, and the package hasn't been published since 2022, so it blocks a move to Vue 3. Pages also lack a consistent H1, and screen reader users hear nothing when the route changes because focus doesn't move; this issue replaces vue-meta with one core mechanism that sets the title, supplies each page's H1 and sets the focus target after navigation.
Scope
- Add a core composable that route components, including nested side panel and modal routes, call from
setup()to register their title. - Add one core formatter: parts most specific first, joined with " - ", ending in
kolibriLabel; in RTL languages, prefixed with U+200F and with U+200F on both sides of each separator; it also supplies the error-page title. - The composable returns the formatted title.
- Migrate all 61
metaInfocomponents and Coach'sroute.meta.titleParts, then removevue-meta. - Render the registered title as a visually hidden H1 in
AppBarPageandImmersivePage; pages that already render a visible<h1>opt out and use it instead. - Move focus to the page's H1 after each route change, except when the new route opens a side panel or modal.
- Excluded: turning existing visible headings into the H1, better title wording (#4466), the GNOME window title (#15343).
Guidance
- Composable conventions:
docs/frontend_architecture/composables.rst - Hide the H1 with the global
visuallyhiddenclass from KDSlib/styles/common.scss, notdisplay: none. Existing usage:TooltipContent.vue#L12 - Title messages live in
createTranslatorobjects, not component$trs, so no caller needsgetCurrentInstance.
Strategy
- The composable is the only source of a page's title; the core formatter, the H1 and the focus target all read from it.
- The innermost registration wins, so a nested side panel or modal route overrides its parent page's title while mounted.
- A title is removed when its component unmounts.
- Migrate incrementally, plugin by plugin: the composable leaves the title to
vue-metawhile anymetaInfocomponent is mounted, so each plugin migrates its layout with its pages;vue-metagoes once the lastmetaInfois gone.
Testing Requirements
- Jest tests cover the composable and formatter: nested registration, unmount, RTL order and marks, the error title, the suffix and the
metaInfogate. - Jest tests cover focus placement after a route change.
Acceptance Criteria
- [ ] Every browser tab title ends in " - Kolibri", or is just "Kolibri" on a page that registers no title.
- [ ] Apart from the added suffix, each page's title text is unchanged.
- [ ] In RTL languages, title parts keep logical order (most specific first), the title starts with U+200F, and each separator has U+200F on both sides; LTR titles carry no marks.
- [ ] An error page's title is "Error - Kolibri".
- [ ] Every page has exactly one H1.
- [ ] After navigating to a page, focus is on its H1; opening a side panel or modal route leaves focus in the panel.
- [ ] Deleting a lesson in Coach > Plan > Lessons > <lesson> > Options > Delete logs no error starting with:
Failed to obtain page title. - [ ]
vue-metais gone frompackages/kolibri/package.json,packages/kolibri-jest-config/package.jsonandpnpm-workspace.yaml.
AI usage
I chose the approach (a core composable replacing vue-meta), the scope and exclusions, the incremental migration, and the relationships to other issues; Claude Code surveyed the codebase and drafted the sections.
Split into sub-issues — shape: Enabler → fan-out → sink.
Filed now:
- #15393 Sign-in, setup wizard and policy page titles come from the core composable — blocked by #15395
- #15394 Coach page titles come from the core composable, and leaving a deleted lesson logs no title error — blocked by #15395
- #15395 Pages register their tab title and H1 through a core composable
- #15396 Device page titles come from the core composable — blocked by #15395
- #15397 Facility page titles come from the core composable — blocked by #15395
- #15398 Focus moves to the page's H1 after each route change — blocked by #15395
- #15399 Learn page titles come from the core composable — blocked by #15395
- #15400 Kolibri no longer depends on vue-meta — blocked by #15393, #15401, #15399, #15397, #15396, #15394, #15398
- #15401 Profile page titles come from the core composable — blocked by #15395
This issue closes once every sub-issue has settled and its acceptance criteria are met.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
Revisited after #15395 settled — rewrote #15394, #15397, #15398.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
Revisited after #15393 settled.
Rewrote #15400 Kolibri no longer depends on vue-meta:
- Errored-page criterion narrowed. An errored setup wizard step keeps "Setup Wizard - Kolibri", as #15393 settled.
Written by rtibblesbot, an LLM-based coding agent.
Revisited after #15394, #15396, #15397, #15399, #15401 settled.
Rewrote #15400 Kolibri no longer depends on vue-meta:
- H1 criterion narrowed. Loading, side panel,
KModaland hidden-sign-in-title states moved to #15467, #15474, #15483 and #15465. - Out of scope extended. Those four issues, and #15510's Coach panel titles.
- Create new user path corrected. The panel opens from Facility > Users > New user, over New users, as #15397 settled.
- References repointed to
developwithmetaInfoTrackerand the composable's guard.
Written by rtibblesbot, an LLM-based coding agent.
Revisited after #15510 settled.
Rewrote #15400 Kolibri no longer depends on vue-meta:
- Coach panel titles brought into scope. #15522 closed #15510; the tab-title criterion now covers Manage resources and Assign course, and Out of scope drops #15510.
Written by rtibblesbot, an LLM-based coding agent.
Revisited after #15483 settled.
Rewrote #15400 Kolibri no longer depends on vue-meta:
KModalout-of-scope repointed. #15483 closed in favour of learningequality/kolibri-design-system#1331 and learningequality/kolibri-design-system#1312.
Written by rtibblesbot, an LLM-based coding agent.
Revisited after #15467 settled.
Rewrote #15400 Kolibri no longer depends on vue-meta:
- One-H1 check covers loading. #15467 shipped one H1 while loading, so it leaves Out of Scope and the one-H1 criterion now applies while each page loads.
- Focus check covers pages that load their own H1. The focus criterion names a page whose own
<h1>replaces the hidden one after loading.
Written by rtibblesbot, an LLM-based coding agent.