feat(portal-shell): collapse accessibility routes into one i18n-marked route #94

Merged
julien merged 1 commits from feat/portal-shell/i18n-accessibility-route-fusion into main 2026-05-11 20:18:30 +02:00

1 Commits

Author SHA1 Message Date
Julien Gautier 44f00dced3 feat(portal-shell): collapse accessibility routes into one i18n-marked route
CI / commits (pull_request) Successful in 3m9s
CI / scan (pull_request) Successful in 3m9s
CI / check (pull_request) Successful in 3m21s
CI / a11y (pull_request) Successful in 2m0s
CI / perf (pull_request) Successful in 6m9s
Continue ADR-0019: replace the `/accessibility` + `/accessibilite`
twin routes with a single canonical `/accessibility` path whose
content is i18n-marked in templates. The per-locale build (en/fr)
already inlines the right copy — the route data + `copy()` service
indirection is no longer needed.

What changes:

- `AccessibilityStatement` loses its `ActivatedRoute` injection, its
  `Lang` discriminator and the `COPY` lookup table. The component is
  now a plain shell over the template.
- `accessibility.html` carries the title + intro + status panel
  strings as `i18n="@@page.accessibility.*"` markers; six new
  trans-units in `messages.fr.xlf` provide the French copy
  (verbatim from the old `COPY.fr` block, kept identical so the page
  reads the same in FR).
- `app.routes.ts` declares the single canonical route and keeps
  `/accessibilite` as a `redirectTo: 'accessibility'` for backward
  compatibility with existing bookmarks. Drops the `data.lang`
  payload — no longer consumed.
- `footer.html` collapses the dual link (`Accessibility` /
  `Accessibilité`) into one i18n-marked link
  (`@@footer.accessibilityLink`). EN bundle reads "Accessibility
  statement"; FR bundle reads "Déclaration d'accessibilité".

The path stays in English across both locales for now
(`/{en,fr}/accessibility`). Translating route segments
(`/fr/declaration-d-accessibilite`) is a future refinement that needs
either a custom URL serializer or per-locale route trees — not worth
the complexity at this scale.

Specs:

- `accessibility.spec.ts` loses the `lang`-based tests and asserts
  on the rendered EN source content + the amber-panel structure
  (specs run in the source locale).
- `footer.spec.ts` asserts on the single accessibility link and the
  absence of the historical `/accessibilite` href.

Test plan / verification:

- 35/35 specs pass (was 36; one obsolete `lang` fallback test
  removed).
- Production build emits both locales; FR chunk contains "Statut",
  "Déclaration", FR intro/panel bodies, and no leftover English from
  the swept strings.
2026-05-11 20:12:12 +02:00