diff --git a/apps/web/src/app.css b/apps/web/src/app.css index e81a46b..b3f7ed9 100644 --- a/apps/web/src/app.css +++ b/apps/web/src/app.css @@ -26,6 +26,58 @@ body { min-height: 100dvh; } + + /* Sichtbarer Fokus-Ring für Tastatur-Nutzer. Tailwind 4 strippt + die Browser-Defaults; wir setzen einen expliziten Outline. + Nur :focus-visible, damit Maus-Klicks visuell sauber bleiben. */ + :focus-visible { + outline: 2px solid var(--color-primary); + outline-offset: 2px; + border-radius: 2px; + } + + /* Screen-Reader-only Utility. Wird im Study-View genutzt, um die + Prompt-/Answer-Regionen unsichtbar zu betiteln. */ + .sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; + } + + /* Skip-Link: versteckt bis Fokus, dann sprung zur Main-Region. */ + .skip-link { + position: absolute; + top: 0; + left: 0; + padding: 0.5rem 0.75rem; + background: var(--color-primary); + color: var(--color-primary-fg); + z-index: 50; + transform: translateY(-200%); + transition: transform 0.15s; + } + .skip-link:focus { + transform: translateY(0); + } +} + +/* Reduce-Motion-Respekt: Animationen + Transitions ausschalten, + wenn der User das im OS so eingestellt hat. */ +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } } @media (prefers-color-scheme: dark) { diff --git a/apps/web/src/lib/components/Header.svelte b/apps/web/src/lib/components/Header.svelte index f87b008..59a3045 100644 --- a/apps/web/src/lib/components/Header.svelte +++ b/apps/web/src/lib/components/Header.svelte @@ -18,7 +18,7 @@ {t('app.name')} -