fix(invites): i18n legend + touch target in UserGroupsSection

- legend uses m.admin_new_invite_groups() instead of hardcoded "Gruppen"
  so screen readers announce the correct string in en/es locales
- label gets min-h-[44px] for WCAG 2.2 touch target compliance
- add test asserting fieldset accessible name comes from i18n key
- add test documenting empty-groups-no-error renders no checkboxes/banner

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-14 16:43:53 +02:00
committed by marcel
parent e2632a556d
commit 24a398a0d8
2 changed files with 39 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
<script lang="ts">
import { m } from '$lib/paraglide/messages.js';
let {
groups,
selectedGroupIds = []
@@ -11,9 +13,9 @@ let selected = $state<string[]>([...selectedGroupIds]);
</script>
<fieldset class="flex flex-wrap gap-3 border-none p-0">
<legend class="sr-only">Gruppen</legend>
<legend class="sr-only">{m.admin_new_invite_groups()}</legend>
{#each groups as group (group.id)}
<label class="inline-flex items-center gap-2 text-sm text-ink-2">
<label class="inline-flex min-h-[44px] items-center gap-2 text-sm text-ink-2">
<input
type="checkbox"
name="groupIds"