department-of-veterans-affairs / va-forms-system-core

VA Forms System Core will be a React library hosted in NPM that will allow engineers and designers to easily interact with Forms inside of vets-website.
https://department-of-veterans-affairs.github.io/va-forms-system-core/
6 stars 4 forks source link

(Needs refinement) When should errors be triggered? #588

Open taylorkaren opened 2 years ago

taylorkaren commented 2 years ago

Context

From Ticket #557 (accessibility audit finding on the demo burial form reported by Tiffany Pender: When do we trigger errors? Currently, errors get triggered if a field is blank. While this makes sense conceptually because veterans can't submit blank data on required fields, it creates challenges for people who use assistive technology. People who use screen readers may often quickly tab through the fields without filling them in to understand what's on a page. When errors get triggered during that process, it becomes overwhelming. How might we design to respect that way of scanning a page? Some ideas: a. Trigger errors on "Continue" button press. b. Only trigger errors after a person leaves a field if data is in it. In other words, only trigger errors on blank fields when "Continue" is pressed.

Task Description

TBD. Will follow on from From Matt's comment on ticket #557: I haven't had a chance yet to talk to the DST about what it would take to allow for tabbing through form fields without throwing errors. I believe we all agree that a minimum entry should be necessary before firing an alert. I just don't know technically across all of our form components how far we are from that behavior today (i.e. how many components we would we need to refactor). I believe we just did this for the new Memorable Date component so, it should be possible.

I will file an issue for that for the DST to mull over: (Some form components trigger an error immediately onBlur when a field is blank).

Acceptance Criteria

TBD

taylorkaren commented 2 years ago

Potentially related to ticket #611.