Make form errors and groups understandable.
- labels
- fieldset
- instructions
- required state
- error association
- autocomplete
Review your registration form with keyboard navigation and screen reader inspection.
- Open the result in a browser and inspect the HTML and computed CSS.
- Test at narrow and wide widths and use the keyboard for interactive elements.
- Write down one thing you changed after testing.
Every form control needs an accessible name, usually from a visible label. Instructions and error text can be associated with the relevant control. Fieldset and legend describe a group as a whole. Required status and constraints should be clear before submission, and autocomplete can reduce typing. During an error, preserve the entered values and state how to fix the problem.
Color alone is not a complete error message. A group of radio buttons without a question can be hard to understand out of context.
Build a contact preference group and one required field. Inspect its accessible name and description, then submit an empty value and write a useful error message.
- Rebuild the core idea without copying the example line by line.
- Explain the key HTML or CSS choice in your own words.
- Test the result at a narrow width and with keyboard navigation where relevant.
Open example.html in a browser. Edit style.css, save, and refresh.
Try: Use a screen reader or accessibility tree to check each control name and description.