Error summary Beta
An error summary is used to present validation errors of a form.
You should always present the status of the submission or alternatively a heading indicating that there was a problem. For exercises the heading “Submission failed” has been generally used.
Provide the name of the field with the error and preferably a link to the erroneous field. Add the error message from the system after the name of the field.
Move keyboard focus to the error summary.
Use the same error message for the field and the error summary, for instance “Input should be a number”.
Make your error messages clear and concise.
- The current error summary does not provide links to the specific fields which have errors.
- There is no consistent heading text yet for other types of forms than exercise forms.
Location of the error summary
Use at the top of a view. In most cases, a view is one web page, but there might be some exceptions:
- A modal window is one view and is distinct from the page it is on top of.
- An embedded exercise is one view, providing is has a clear border.
If you have questions, ideas for improvements or feedback on using these guidelines, you can join the disucssion in this GitHub issue.