HennepinCounty / ed-hcds-components

ed-hcds-components contains accessible code for building a user interface for Hennepin County digital products.
https://www.hennepin.us/design-system
MIT License
4 stars 0 forks source link

a11y fixes to accordion #1

Closed SusannahHarris-HC closed 9 months ago

SusannahHarris-HC commented 9 months ago

The accordion is missing some accessibility features - mainly, when the button is opened, it should say "expanded" or "collapsed". aria-expanded="false" can be used on each button to ensure that the screen reader reads "collapsed". you will need additional JS for the aria-expanded="true" attribute to be implemented. see the examples in the P&CL and USWDS for guidance. Also, since the content has an H4, the button headings should be an h3. See the USWDS site for guidance. Lastly, please change the name of each accordion header to "Title 1" and so on, the name Header is a little bit confusing.

mitchyoung-hc commented 9 months ago

Resolved accessibility issues. Lmk if this works accordingly!

SusannahHarris-HC commented 9 months ago

It looks awesome! The one last thing I'm finding, which was missed before, was that the "+" needed to be hidden from screen readers. I've added that to the accordion buttons and it looks like it's working as expected. Thanks!