cds-snc / platform-forms-client

NextJS application that serves the public-facing website for Forms
https://forms-staging.cdssandbox.xyz/
MIT License
35 stars 13 forks source link

Error message summary and required fields pattern #449

Open srtalbot opened 3 years ago

srtalbot commented 3 years ago

User story: Persona based As an end-user I need context on which errors to fix When provided a summary of the errors on a form So that I can provide the right information to submit the form

Story context Example of an error summary: image.png Example form: https://forms-staging.cdssandbox.xyz/en/id/80 To discuss: should we allow custom error messages for some input fields (like textarea or textField) JSON Syntax documentation

IDRC accessibility audit findings and guidance. See item 2.4.4 and 3.3.3

Acceptance criteria

Design documentation

hillaryl commented 3 years ago

Suggested update to the user story:

As an end-user proceeding through a form with multiple errors I need to know how (a) that there are multiple errors and (b) where they are Before I navigate away from the page containing the errors So that I can successfully submit my form without encountering new errors

hillaryl commented 3 years ago

Research background

Error summaries as a concept were used in other products following GDS best practice guidance .

There doesn't appear to be any research specifically support error summaries, but they have preformed well when testing CDS products (i.e. no major issues result from them).

There are some usability testing findings referenced in the GDS design system issue. The key takeaways are: