fix(#118): resolve wcag2a/wcag2aa violations found by axe-core suite
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Has been cancelled
CI / Backend Unit Tests (pull_request) Has been cancelled
CI / E2E Tests (pull_request) Has been cancelled

- Add <svelte:head><title> to home, persons, admin, login, and error pages
- Add aria-label to hidden file input in DropZone (sr-only but must be labelled)
- Add aria-label to search input in SearchFilterBar
- Create +error.svelte so error pages always have a document title
- axe-core spec: add buildAxe() helper, disable color-contrast (brand palette, tracked separately)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-28 17:29:47 +01:00
parent f9236cc575
commit 9a4e088de9
8 changed files with 39 additions and 5 deletions

View File

@@ -0,0 +1,12 @@
<script lang="ts">
import { page } from '$app/state';
</script>
<svelte:head>
<title>Fehler Familienarchiv</title>
</svelte:head>
<div class="px-4 py-12 text-center font-sans">
<p class="font-sans text-6xl font-bold text-ink">{page.status}</p>
<p class="mt-2 font-sans text-sm text-ink-2">{page.error?.message ?? 'Internal Error'}</p>
</div>

View File

@@ -67,6 +67,10 @@ $effect(() => {
});
</script>
<svelte:head>
<title>Archiv</title>
</svelte:head>
<main class="mx-auto max-w-7xl px-4 py-8 font-sans sm:px-6 lg:px-8">
<SearchFilterBar
bind:q={q}

View File

@@ -202,6 +202,7 @@ $effect(() => {
type="file"
multiple
accept=".pdf,.jpg,.jpeg,.png,.tif,.tiff"
aria-label={m.upload_label()}
class="sr-only"
onchange={handleFileSelect}
/>

View File

@@ -44,6 +44,7 @@ let {
oninput={onSearch}
onfocus={onfocus}
onblur={onblur}
aria-label={m.docs_search_placeholder()}
placeholder={m.docs_search_placeholder()}
class="block w-full border-line py-2.5 pr-10 pl-3 placeholder-ink-3 shadow-sm focus:border-ink focus:ring-ink"
/>

View File

@@ -11,6 +11,10 @@ let { data, form } = $props();
let activeTab = $state('users');
</script>
<svelte:head>
<title>Administration</title>
</svelte:head>
<div class="mx-auto max-w-7xl px-4 py-8 font-sans sm:px-6 lg:px-8">
<div class="mb-8 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
<h1 class="font-serif text-3xl text-ink">{m.admin_heading()}</h1>

View File

@@ -9,6 +9,10 @@ const localeMap = { DE: 'de', EN: 'en', ES: 'es' } as const;
const activeLocale = $derived(getLocale().toUpperCase());
</script>
<svelte:head>
<title>Anmelden</title>
</svelte:head>
<div class="relative flex min-h-screen flex-col bg-canvas">
<!-- Language switcher -->
<div class="absolute top-4 right-4 flex items-center gap-1">

View File

@@ -23,6 +23,10 @@ function handleSearch() {
}
</script>
<svelte:head>
<title>Personen</title>
</svelte:head>
<div class="mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8">
<!-- Header Area -->
<div