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

Repository for design.va.gov website
https://design.va.gov
40 stars 61 forks source link

Mailing address' conditional checkbox creates several a11y issues #1526

Open joshkimux opened 1 year ago

joshkimux commented 1 year ago

Bug Report

What happened

The mailing address has a conditional checkbox to denote if a user lives on a US military base outside of the US. Several key a11y issues exist here:

What I expected to happen

Several better alternatives can be explored. I strongly recommend working with an a11y specialist on this. Some possibilities include, but aren't limited to:

Reproducing

Steps to reproduce:

Documentation on this exists on the design system

Urgency

How urgent is this request? Please select the approriate option below and/or provide details

Details

humancompanion-usds commented 5 months ago

@jeana-adhoc - Would you mind reviewing this issue and determining if our address pattern as it stands still has these issues or has solved them and update the issue accordingly? Thanks!

jeana-adhoc commented 5 months ago

After talking with the A11y Community of Practice we've come up with a few ways to make this even more accessible.

The current state of the pattern relies on making the country field "inert" when selected (which is another type of 'disabled' field which the Design System has stated they want to avoid). While this did resolve some of Josh's concerns around color contrast, the country is still not 'visible' or interactive to screen reader users.

Here are some action steps we'd like to take:

For all forms

  1. We'd like to make United States the default option in the select. I had even written a ticket about this back in August 2023.

For military addresses There are two options we could take:

  1. If military address checkbox is selected, strip out all of the other countries from the select box so that United States is the only option that can be selected. This allows the country to still be an interactive element that keyboard/screen reader users can hear announced when tabbing through the form. But they would be unable to select any other country.

    • This may violate the Design Experience principle "Don’t give Veterans options that aren’t actionable. Avoid dead ends by providing relevant next steps a Veteran can take by leveraging user data and available services." (Although it's not really a dead end)
  2. If military address checkbox is selected, completely remove the country field from the form page. There's a11y cop concern that this could cause confusion for users. Why is the field removed? However the collapsed additional info component does explain that United States is the only correction country for military addresses.

Exploration and conversations continue - will update when there's more to add/a route to take.