fix(i18n): keep root links in the active locale and fix switcher a11y
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / Lint + typecheck (pull_request) Successful in 1m7s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Successful in 9s
PR Check / Dockerfile lint (droast) (pull_request) Successful in 5s
PR Check / AI code review (opencode) (pull_request) Successful in 55s

AppNav, AppLogo and AppBottomNav used NuxtLink to "/", which resolves to the English root under prefix_except_default; they now use NuxtLinkLocale and drop the hardcoded aria-current. Bottom-nav labels go through $t as well. The switcher's accessible name now contains the visible locale code, aria-haspopup is gone in favour of a plain disclosure with aria-controls, and Escape returns focus to the trigger.
This commit is contained in:
Noel Sabia committed 2026-10-23 22:34:09 +02:00
1 parent 078a49d14e
commit e4b30ad944
4 files changed
+22 -15

No files matched your search

+2 -3
View File
@@ -1,12 +1,11 @@
<template>
<nav class="hidden lg:flex items-center gap-1.5">
<NuxtLink
<NuxtLinkLocale
to="/"
aria-current="page"
class="px-3 py-1.5 transition-colors bg-primary-container text-on-primary-container font-medium rounded font-body-sm text-body-sm"
>
{{ $t('nav.overview') }}
</NuxtLink>
</NuxtLinkLocale>
<a
href="#"
class="px-3 py-1.5 text-on-surface-variant hover:text-on-surface hover:bg-surface-container-high transition-colors font-body-sm text-body-sm"