Clear Form Structure
Forms should use proper html structure and help users avoid and correct mistakes.
Why
Everyone makes mistakes. However, people with some disabilities have more difficulty creating error-free input. In addition, it may be harder for them to detect that they have made an error. Typical error indication methods may not be obvious to them because of a limited field of view, limited color perception, or use of assistive technology. (WCAG 3.3 Input Assistance)
Best Practices
[ example of a good form that shows both code and visual? ]
- Input fields must be labeled to let users know what input is expected
- Input errors (such as when a user omits required information or inputs illegal data types or values) must be specified both visually and in text
- Provide suggestions on how to fix input errors (ex. "Please provide the name of the month.")
- Use a confirmation step to avoid serious consequences as the result of a mistake when performing an action that cannot be reversed