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 -2
View File
@@ -9,7 +9,7 @@ const flat = AVATAR_SPRITE
</script>
<template>
<NuxtLink to="/" class="group flex items-center gap-3">
<NuxtLinkLocale to="/" class="group flex items-center gap-3">
<span class="flex items-center justify-center w-8 h-8 rounded bg-surface-container-high transition-colors">
<span class="pixel-avatar" aria-hidden="true">
<span
@@ -24,7 +24,7 @@ const flat = AVATAR_SPRITE
<span class="font-headline-sm text-headline-sm tracking-tight text-on-surface font-medium">Noel Sabia</span>
<span class="font-label-mono text-label-mono text-on-surface-variant tracking-wider uppercase text-[0.625rem]">Im using Arch btw</span>
</div>
</NuxtLink>
</NuxtLinkLocale>
</template>
<style scoped>