fix(quick-260921-bi2): a11y - Beschriftungen an Felder binden (22 Fundstellen)

noLabelWithoutControl (22) auf 0: jede Beschriftung ueber htmlFor/id an ihr
Feld gebunden, in Formularen mit wiederholten Zeilen ueber praefixierte,
seitenweit eindeutige Kennungen (z.B. ldap-*, user-*, tenant-*).

Sonderfall calendar-source-form.tsx: die Farbauswahl beschriftet eine ganze
Gruppe von Farb-Schaltflaechen, kein einzelnes Feld. Dafuer fieldset/legend
statt htmlFor/id (Rand/Abstand zurueckgesetzt, damit sich am Erscheinungsbild
nichts aendert) -- eine Umwandlung in <span> haette die Assoziation entfernt
statt sie herzustellen, darum nicht gewaehlt.

Damit steht der gesamte Lint-Rueckstand bei 465 (386 echt, 79 Test),
Fehlerstufe 0 -- Zielwert dieses Vorgangs erreicht. Die fuenf zurueck-
gestellten Regeln (noNoninteractiveElementInteractions, useKeyWithClick-
Events, noStaticElementInteractions, useAriaPropsSupportedByRole,
noAutofocus) stehen unveraendert bei 11/5/5/5/4.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TPPB4ApQxzSU1rwV2Ffj9J
This commit is contained in:
2026-09-21 09:38:14 +02:00
parent 21c85a8b88
commit c79bafa179
7 changed files with 50 additions and 25 deletions
+10 -5
View File
@@ -355,10 +355,11 @@ export default function AdminUsersPage() {
</h2>
<form onSubmit={handleSubmit} className="space-y-4">
<div className="space-y-2">
<label className="text-sm font-medium text-foreground">
<label htmlFor="user-username" className="text-sm font-medium text-foreground">
{t('username')}
</label>
<input
id="user-username"
type="text"
required
value={formData.username}
@@ -369,10 +370,11 @@ export default function AdminUsersPage() {
/>
</div>
<div className="space-y-2">
<label className="text-sm font-medium text-foreground">
<label htmlFor="user-email" className="text-sm font-medium text-foreground">
{t('email')}
</label>
<input
id="user-email"
type="email"
required
value={formData.email}
@@ -383,7 +385,7 @@ export default function AdminUsersPage() {
/>
</div>
<div className="space-y-2">
<label className="text-sm font-medium text-foreground">
<label htmlFor="user-password" className="text-sm font-medium text-foreground">
{t('password')}
{editingUser && (
<span className="ml-1 text-xs text-muted-foreground">
@@ -392,6 +394,7 @@ export default function AdminUsersPage() {
)}
</label>
<input
id="user-password"
type="password"
required={!editingUser}
minLength={8}
@@ -403,10 +406,11 @@ export default function AdminUsersPage() {
/>
</div>
<div className="space-y-2">
<label className="text-sm font-medium text-foreground">
<label htmlFor="user-display-name" className="text-sm font-medium text-foreground">
{t('displayName')}
</label>
<input
id="user-display-name"
type="text"
value={formData.displayName}
onChange={(e) =>
@@ -416,10 +420,11 @@ export default function AdminUsersPage() {
/>
</div>
<div className="space-y-2">
<label className="text-sm font-medium text-foreground">
<label htmlFor="user-role" className="text-sm font-medium text-foreground">
{t('role')}
</label>
<select
id="user-role"
value={formData.role}
onChange={(e) =>
setFormData({