Hello,
I’ve observed a couple of accessibility issues with the Advanced Sidebar – Navigation block, when using the Enable Accordion menu feature –
- The accordion toggle is missing the aria-expanded attribute. This should be set to “false” when the accordion is closed, and “true” when the accordion is open. Ideally, the attribute’s value would be set when the page loads, so if the accordion is set to be closed on page load, the aria-expanded value would already be set to “false”. (https://www.w3.org/WAI/ARIA/apg/patterns/accordion/examples/accordion/)
- The accordion toggle’s title is lacking. When I hit the toggle, my screen reader will read “menu section open” or “menu section close” depending on the current state of the menu. It would be helpful for the user for the accordion toggle to contain the title or text of the link it is attached to. This would indicate to the user what sort of content to expect out of the accordion.
- This behavior was improved by using the ‘Use links for open/close’ feature, but when I enabled this, the original accordion toggle was still present + linked. This ends up being redundant.
If these issues could be patched, we would greatly appreciate it. The website these issues are present on is not yet live, so I’d be happy to meet up in a screen share session to demonstrate them. Please let me know if I can provide any additional information.
Many thanks,
Zach
OnPoint Plugins
Hi Zach,
Turns out this was a regression issue from version 9.3.0. At that time we moved away from Dashicons to SVG to improve performance and the
aria-expanded
attributes inadvertently removed.I’ve added the
aria-expanded
attributes as well as therole="button"
back into the icons which will be included in the next release. I’ve also updated our unit tests to make sure we catch this in the future.As far as improving the
aria-label
to include the the item’s title, this is going to take some planning to implement. I’ve logged a ticket in our internal system but at the moment I don’t have a timeline to provide.Have a great night!
Tiffany Maiuri
Thank you so much!
Hope you have a nice weekend.
Best,
Zach