department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 201 forks source link

[UX, FE] 10-10EZ - TERA - Remove special characters explanatory text for other toxic exposures field + update error #82212

Closed aagosto90 closed 2 months ago

aagosto90 commented 5 months ago

Description

During TERA usability research, we uncovered a bug where a user tried to enter multiple other toxic exposures separated by a comma and kept getting an error with no clear explanation as to why. We identified that this was because of the comma so CAIA helped us write a line of text to explain to Veterans how to avoid that error by not entering special characters, but we ultimately want Veterans to be able to enter whatever characters help them best explain their other toxic exposures.

Once VES is ready to accept some special characters for the "other toxic exposures" field, we can remove the text that we added to help Veterans avoid errors due to special characters. The VES team says they will be implementing this change in June 2024 (likely around the 6/10 release date) so once we have confirmation from them that the system can accept special characters, we should remove the extra text that we added to that question.

VES will only accept these 4 special characters: . ? ! , so we will still need an error for any other special characters. That error should read: "You entered a character we can't accept. Remove any special characters other than these: . ? ! ," (Design to verify this with CAIA)

Tasks

Acceptance criteria

emily-brown34 commented 3 months ago

waiting on other changes from VES before we can make this change. let's check back in with them though and see if this is done/when it will be done @aagosto90

hdjustice commented 2 months ago

Meena confirmed the additional punctuation was implemented for the TERA "Other" freeform text field! We should be able to make whatever changes we need to allow for the four items (period, comma, question mark and exclamation mark).

Yes we have implemented the change to allow some punctuation for the “Other” freeform text field. Following is the regex that we are using ^[a-zA-Z0-9,.?! ]*$ and it should now allow the following period, comma, question mark and exclamation mark.

aagosto90 commented 2 months ago

Here is the Figma file with the updated design for this other toxic exposures field. We should remove the current hint text and if the user enters a character other than the 4 that VES can accept, we should show the error message in this mockup which has been written and approved by CAIA.

hdjustice commented 2 months ago

Testing in RI, confirmed only the four acceptable punctuation is allowed on UI, all other punctuation characters trigger an error message (one example of error message below) image image

hdjustice commented 2 months ago

Ok to launch!

longmd commented 2 months ago

New CAIA-approved error message: You entered a character that we can't accept. You can use only these characters: . , ! ?