department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
284 stars 206 forks source link

[a11y-defect-3]: Download benefit letters "Expand all" button should not have an `aria-expanded` attribute #96354

Open 1Copenut opened 3 weeks ago

1Copenut commented 3 weeks ago

Point of contact

Trevor Pierce

Severity level

3, Moderate. Should be fixed in 1-3 sprints post-launch.

Details

The VA Documents and Letters (step 2) view has an "Expand all" button for the accordions. This button has an aria-expanded attribute that doesn't make sense here because it's a control for multiple accordions, with text that updates to match its current state. Screenshot attached.


Image

Reproduction steps

  1. Log into https://staging.va.gov/records/download-va-letters/letters/letter-list with a test user who has benefit letters. I used user 54.
  2. Turn on the screen reader of your choice
  3. Tab to the "Expand all" button and listen for it to say "Expand all accordions, button, collapsed"
  4. Press Enter to expand the accordions
  5. Verify the button now says "Close all accordions, button, expanded"

Proposed solution or next steps

I'm proposing we remove the aria-expanded attribute from this button and just use the text to describe what action the button will take.

References, articles, or WCAG support

  1. Understanding SC 1.3.1: Info and Relationships (Level A)

Type of issue

1Copenut commented 1 week ago

@dysbo I'm grabbing this one off the backlog while I'm blocked on my other accessibility ticket. Should be a very quick win for us.

1Copenut commented 1 week ago

Turns out this is an upstream item in the VADS. I'll pivot and work in that repo to issue a patch fix.