department-of-veterans-affairs / vets-design-system-documentation

Repository for design.va.gov website
https://design.va.gov
37 stars 57 forks source link

Input Mask USWDS v3 - Development #1676

Open jamigibbs opened 1 year ago

jamigibbs commented 1 year ago

Description

The USWDS system has added an Input Mask component that we would like to use. At a minimum, we would like to use the SSN mask since that is currently being used on the 10-10EZ form and we also provide SSN guidance as well:

If it's possible to use the USWDS input mask script to work with web components, then we should do that (so that we can provide the updated script back to the USWDS team). We may need to take other approaches for this to work though so part of this ticket will be to explore the best approach to scripting since it's not written with web components in mind (as was already discussed/discovered previously).

Some additional USWDS references that might helpful:

Tasks

Acceptance Criteria

jamigibbs commented 1 year ago

The USWDS team is working on an updated version of input mask: https://github.com/uswds/uswds/pull/5227

caw310 commented 1 year ago

Work on this could take 2 sprints

Mottie commented 2 months ago

Not sure if it's applicable for this new component, but I tested the new SSN web component field (web-component-fields/SsnField). It replaces the value with a masked value on blur, which then led to e2e test failures - the Cypress command that fills in the input also checks the resulting value of the input.

Timed out retrying after 4000ms expected '345678900', actual '●●●-●●-8900'