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:
@@ -18,11 +18,12 @@ export function PasswordField({ value, onChange, show }: PasswordFieldProps) {
|
||||
|
||||
return (
|
||||
<div className="space-y-1">
|
||||
<label className="block text-sm text-foreground">
|
||||
<label htmlFor="cert-manager-password" className="block text-sm text-foreground">
|
||||
{t('password.label')}
|
||||
</label>
|
||||
<div className="relative flex items-center">
|
||||
<input
|
||||
id="cert-manager-password"
|
||||
type={revealed ? 'text' : 'password'}
|
||||
value={value}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
|
||||
Reference in New Issue
Block a user