← Webalkalmazás fejlesztők adatlapja
Nézd meg, miben segít
Akadálymentes űrlapok és hibák
Állandó címkékkel, érthető útmutatókkal és javítható hibaüzenetekkel teszi használhatóbbá az űrlapokat.
accessible-forms-validation
Ezt a skillt használó csapattagok
Mikor hasznos?
Akkor használd, ha regisztrációkor nem világos, mit kell kitöltened vagy miért sikertelen a beküldés.
Miben segít neked?
- Csoportosítja az összetartozó mezőket, beállítja az automatikus kitöltési jelzéseket.
- A konkrét hibákat a mezőkhöz kapcsolja, és oda irányítja a fókuszt.
- Kezeli a folyamatban lévő beküldést és a véletlen ismétléseket.
Például ezt kérheted
Vizsgáld meg a regisztráció hiányzó mezőit, szerverhibáit, jelszóbeillesztését és a hibaösszesítőből történő navigációt. Elutasított e-mail-címnél maradjon meg a többi adat, és a hiba kapcsolódjon a mezőhöz. Ismételt kattintásból ne legyen több regisztráció.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
Accessible Forms & Validation
Forms are where users create accounts, configure settings, enter payment details and complete core workflows. Every field must state clearly what input is expected, whether it is required, why validation failed and how to recover (WCAG 1.3.1, 1.3.5, 2.4.6, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.7, 3.3.8).
1. Labels, Instructions & Grouping
- Persistent visible
<label>: every<input>,<select>and<textarea>needs a permanently visible<label for="field-id">(or explicitaria-labelledbywhen a visible heading acts as the label). - Never use
placeholderas the only label: placeholders disappear as soon as the user types, strain short-term memory, often fail4.5:1contrast, and are not treated as reliable accessible names across all assistive technologies. - Format hints & helper text: place formatting rules (e.g.,
"Use YYYY-MM-DD","Minimum 12 characters") in visible text above or adjacent to the input and link them viaaria-describedby="hint-id"before the user submits. - Group related controls (
<fieldset>+<legend>):- Wrap radio button groups, checkbox groups, date parts (Day / Month / Year) and repeated address blocks (Shipping vs. Billing) in a
<fieldset>with a concise<legend>(orrole="group"/role="radiogroup"witharia-labelledby). - Without a group legend, a screen reader user hears "Yes, radio button 1 of 2" without knowing what question "Yes" answers.
- Wrap radio button groups, checkbox groups, date parts (Day / Month / Year) and repeated address blocks (Shipping vs. Billing) in a
- Input purpose & cognitive support:
- Set appropriate
type(email,tel,url,number,search,password) andinputmode(numeric,decimal) so mobile keyboards match the data. - Add standard
autocompleteattributes (name,email,username,current-password,new-password,one-time-code,street-address,cc-number) on personal data fields (WCAG 1.3.5). - Never block paste (
onpasteprevention) on password or verification fields (WCAG 3.3.8 Accessible Authentication).
- Set appropriate
2. Error Identification, Association & Focus Management
When client-side or server-side validation fails:
- Mark invalid fields programmatically: set
aria-invalid="true"on the offending input(s) (and removearia-invalidor set"false"once corrected). - Associate the error message with the field:
- Render a visible, specific error message next to the field (
<p id="email-error">Enter a valid work email address, including '@'</p>). - Reference the error ID in
aria-describedby="email-hint email-error"(oraria-errormessagewhere supported alongsidearia-describedby), keeping both helper text and error text linked. - Do not rely on red border color alone — include text and an icon (
aria-hidden="true") alongside the message (WCAG 1.4.1).
- Render a visible, specific error message next to the field (
- Move focus predictably on submit failure:
- For short forms: move focus directly to the first invalid input so the user hears the field label,
invalid entry, and its linked error message immediately. - For long or multi-section forms: render an Error Summary at the top of the form (
role="alert"or focused container withtabindex="-1"and a heading like"There are 3 problems with your submission"), where each item is an anchor link (<a href="#field-id">) that jumps focus directly to the corresponding invalid field.
- For short forms: move focus directly to the first invalid input so the user hears the field label,
3. Disabled Submit Buttons vs. Helpful Validation
- Avoid disabling the primary Submit button silently while the user is still filling out a complex form — disabled buttons cannot receive keyboard focus by default and give no explanation of why submission is blocked.
- Prefer allowing submission and guiding the user directly to the missing or invalid field with a clear error message.
- During in-flight submission (
pendingstate), prevent duplicate submits while keeping focus stable (aria-disabled="true"oraria-busy="true"with visible loading feedback).
Csomagban lévő fájlok 1
SKILL.md
