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:
@@ -250,10 +250,11 @@ export default function AdminTenantsPage() {
|
||||
</h2>
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<label className="text-sm font-medium text-foreground">
|
||||
<label htmlFor="tenant-name" className="text-sm font-medium text-foreground">
|
||||
{t('name')}
|
||||
</label>
|
||||
<input
|
||||
id="tenant-name"
|
||||
type="text"
|
||||
required
|
||||
value={formData.name}
|
||||
@@ -265,10 +266,11 @@ export default function AdminTenantsPage() {
|
||||
</div>
|
||||
{!editingTenant && (
|
||||
<div className="space-y-2">
|
||||
<label className="text-sm font-medium text-foreground">
|
||||
<label htmlFor="tenant-slug" className="text-sm font-medium text-foreground">
|
||||
{t('slug')}
|
||||
</label>
|
||||
<input
|
||||
id="tenant-slug"
|
||||
type="text"
|
||||
required
|
||||
pattern="^[a-z0-9-]+$"
|
||||
|
||||
Reference in New Issue
Block a user