-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some form components trigger an error immediately onBlur when a field is blank #1130
Comments
Any work for the Forms Library team related to this issue would be done on the When should errors be triggered? ticket |
Moving back to reviewed/needs prioritizing since we do not have a11y support at this time. |
@ndsprinkle - Picking up our conversation over in this issue, which is more relevant.
Can we undo that, or prevent that, without upsetting everything else? By that I mean, can we change "touched" to mean some characters were entered into the field or the field was set to a non-default value (to handle selects)? I'd like to address the concerns in this issue but I'd also like to retain the functionality of immediate feedback to the user when an error has been rectified.
I agree and would want to retain that but change the definition of "touched".
That's still relevant and still the correct behavior.
What if Back wasn't a button and was instead a link? Would that uncomplicate matters a bit when combined with changing the definition of "touched"? @caw310 and @PSIEBENLIST - Let's get the devs on both teams together to talk through this issue and the requested changes to the va-button-pair component. I'd like to make and validate these changes this quarter. |
@humancompanion-usds These are great questions that I don't fully know the answer to. I definitely agree with getting the teams together and talking about it. I think it's worth some digging and experimenting to figure out if stuff breaks and how much stuff breaks. In general, I feel like this should be possible, but as always, the forms library supports a bunch of custom functionality around validation and transition functions (like |
The forms library team and DS team discussed this and the main issue is the "required" error displaying before content has been entered into the fields. The design system components rely on the For our part though, the Design System team should check the form components to make sure this isn't an issue with the component itself. The way we should be testing them is:
If an error/validation displays (required or otherwise), we should flag this as an issue that the DS team should investigate because we want users to be able tab through form fields if they have not entered anything yet without getting a validation error. cc @caw310 |
@ndsprinkle and @rhasselle-oddball - Do we want to look into fixing this issue when we fix this one? department-of-veterans-affairs/va.gov-team#5190 |
Fixed for all forms - generic RJSF onBlur handler for fields to no longer set fields to touched if a field is empty on the first pass, which will in turn not trigger validation. |
Yay! |
Description
The a11y specialists have noted that screen reader users often tab through all the fields in a form to learn how long the form is and what is going to be asked of them. When doing that it would appear that some of our components throw an immediate error when tabbing out of the field to the next field. We recently addressed this, I believe, in the Memorable Date component as that component is comprised of 3 text-input fields.
This issue is to track investigating which of our components throw an immediate error when you leave the field (onBlur) and what it would take to prevent that. If this is just a method we provide, can we not throw an error until a certain number of characters are entered, for example in a text-input or textarea, or a a change made, for example in a select, radio, or checkbox.
Details
The outcome of this work should be a recommendation on what the lift would be to accommodate the accessibility concerns here and not throw an error on a blank field or field that has not been changed.
The text was updated successfully, but these errors were encountered: