CDCgov / dibbs-query-connector

A FHIR client allowing public health agencies to query health care organizations directly or via a TEFCA QHIN
Creative Commons Zero v1.0 Universal
4 stars 0 forks source link

Rework name regex on patient search page #63

Closed katyasoup closed 3 weeks ago

katyasoup commented 3 weeks ago

PULL REQUEST

Summary

Related Issue

Fixes #56

Acceptance Criteria

Patient form field accepts a reasonable (up to the dev to determine what reasonable means!) set of patient names, which would include dashes / apostrophes etc. that might show up in a name

Allowed characters were chosen based on USWDS Guidance and HealthCare.gov validation rules/messaging

Some names that should pass validation:

Some names that should fail validation:

When an input fails validation, the tooltip should now display details on acceptable input characters like so:

Screenshot 2024-10-25 at 15 14 29

Additional Information

There's an argument to be made (see USWDS Usability Guidance) that we shouldn't restrict characters at all; however, this PR's changes align with current usage on various other HHS sites.

The browser tooltip for error handling isn't great for a11y either, so I'd recommend some future work on inline error styling a là the CMS Design System

Checklist