Open shiragoodman opened 2 years ago
This text and markup is actually part of the va-text-input DS component, c.f.:
https://github.com/department-of-veterans-affairs/component-library/blob/master/packages/web-components/src/components/va-text-input/va-text-input.tsx#L231 https://github.com/department-of-veterans-affairs/component-library/blob/292ec37b335fa15891fe0ffc8a525738e7fdcd8e/packages/core/src/i18n/translations/en.js#L4
Just an FYI, we are replacing the identify verification using last 4 of SSN and replacing it with the DOB. We will be using the new Design System's Memorable Date control. It will be going live for a test run on 8/23 and will be available to everyone once we decide there are no issues.
General Information
VFS team name
Modernized Check-in
VFS product name
Patient Check-in
VFS feature name
Pre-check-in and mobile check-in
Point of Contact/Reviewers
Brian DeConinck (@briandeconinck) - Accessibility
*For more information on how to interpret this ticket, please refer to the Anatomy of a Staging Review issue ticket guidance on Platform Website.
Platform Issue
HTML markup isn't valid.
Issue Details
On both the "Start pre-check-in" and "Check in at VA" pages, when a user enters their fourth character into the last 4 SSN field, a
<small>
element appears beneath the field to remind users that the max number of characters is 4.That
<small>
has anaria-live="polite"
attribute on it, but is not announced by screen readers. Screen reader users never receive this extra announcement.Link, screenshot or steps to recreate
Tab
to move focus to the SSN field.VA.gov Experience Standard
Category Number 09, Issue Number 01
Other References
WCAG SC 1.3.1_A
Platform Recommendation
I haven't verified this myself, but I believe this is happening because
aria-live
isn't being applied in quite the right way. As currently coded, thearia-live
attribute is on a<small>
element that doesn't exist in the DOM on page load. When the JS is triggered, the whole element is inserted into the page.aria-live
works by telling a screen reader "watch this space" on page load. Since the<small aria-live="polite">
element doesn't exist yet on page load, the screen reader doesn't know to watch for changes there.Recommended fix: Add a
<div aria-live="polite">
that wraps the<small>
when it's inserted into the page. Thatdiv
should be present and empty on page load. When the<small>
message is inserted, it should announce.Quick aside: I'm also not sure about the current behavior where the message appears after four characters are entered. That means the message will appear (and be announced) every time someone enters their last-four SSN, even if they know to enter just four digits and don't need the extra reminder. For sighted users it's easy to ignore, but getting that announcement every time might be annoying to screen reader users. Does it make sense to add the message on the fifth attempted character instead?
VFS Team Tasks to Complete