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

Repository for design.va.gov website
https://design.va.gov
36 stars 55 forks source link

Review and reassess the design for these v3 components: text-input, textarea, number input #1848

Closed caw310 closed 10 months ago

caw310 commented 11 months ago

Description

Some concerns came up in as slack thread about the min length/max length appearing below input fields that make them not accessible.

https://dsva.slack.com/archives/C01DBGX4P45/p1686752111076939

Tasks

Acceptance Criteria

caw310 commented 11 months ago

Older issue for reference from Robin. https://github.com/department-of-veterans-affairs/va.gov-team/issues/38775

rhasselle-oddball commented 11 months ago

Notes from this slack thread: https://dsva.slack.com/archives/C01DBGX4P45/p1688575091616669

humancompanion-usds commented 11 months ago

@jeana-adhoc and I reassessed and it seems like some v3 MVP work did not get done that needs to be addressed to align with USWDS. USWDS separates out Character count as a distinct component but, the functionality would be implemented in text-input and textarea. That should get done and we should align our design and implementation with the US System.

Here are the details:

humancompanion-usds commented 11 months ago

Assigning to Carol, Andrew, and I so we can discuss who to assign this to and to ensure it is dealt with in the next sprint.

babsdenney commented 10 months ago

@humancompanion-usds @LillyBoot This is ready for review.

humancompanion-usds commented 10 months ago

Approved! Thanks for getting to this so quickly. On to engineering.

it-harrison commented 10 months ago

This will carryover due to need to look into how these changes affect va-memorable-date component, which makes uses of va-text-input

it-harrison commented 10 months ago

@babsdenney @humancompanion-usds just to verify: for v3 text-input do we want to ever allow the minlength attribute, that is even if we are not doing character count?

Put another way, which of the following stories do we retain:

it-harrison commented 10 months ago

@babsdenney @humancompanion-usds one more question: the ticket's title talks about va-number-input but the uswds website doesn't use character count for their version. I assume we want to follow their lead on this?

humancompanion-usds commented 10 months ago

@it-harrison

it-harrison commented 10 months ago

PR is here

it-harrison commented 10 months ago

Hi @briandeconinck - quick a11y question on this ticket. I have a web component that on page load looks like: Screenshot 2023-07-21 at 11.41.59 AM.png The question is, do we need the text in the red box? Having the text in blue and red boxes seems redundant for screen readers but that is how USWDS implemented their version of this component. Thanks much!

briandeconinck commented 10 months ago

@it-harrison Yeah, this seems unnecessary. Looking at the line just above line 1 that you highlighted, I feel like all three of those could be simplified and combined. "You can enter up to 5 characters" seems unnecessary, and there's no reason for the visible character count status to have an aria-hidden and then for there to also be different than the aria-live character count status for screen reader users.

Maybe it's important to announce to screen readers both the initial constraint and the number of characters remaining? But it feels like weird unnecessary handholding to give screen reader users that extra message that's not given to sighted users. I think @jeana-adhoc and @joshkimux were looking at this component in the USWDS at some point too, tagging them in case they have thoughts on it.

Also, this might already be on your list but since we're looking at it --- The "and this is the hint" hint text should be associated with the input using aria-describedby too, just like the charcount-message. As currently coded, a screen reader user won't hear the hint text when they tab into the input.

it-harrison commented 10 months ago

updated for a11y. ready to review.