Problem/Motivation

(Why the issue was filed, steps to reproduce the problem, etc.)
When analyzing my site using the WAVE a11y chrome extensions it reports there is 3 empty buttons and this comes from the module. https://wave.webaim.org/extension/

To reproduce error:
1. Go to a page with the responsive menu on it
2. Use the WAVE chrome extension tool (https://wave.webaim.org/extension/
)
3. Go to the error report.
4. Error will say "3 x empty buttons".

Proposed resolution

Either the buttons to be removed or text be added here. Other solutions to the issue welcomed

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mturner20 created an issue. See original summary.

mturner20’s picture

Issue summary: View changes
mgifford’s picture

Having a screen capture with the HTML helps. Even with the output from WAVE.

mturner20’s picture

mturner20’s picture

Thank you @mgifford I have attached screenshots of the three errors in the markup.

mgifford’s picture

Ya, that's broken... But at least the maintainers can see the source and track it down now. Thanks!

mandclu’s picture

The surprising thing is that each button does have aria-hidden="true" role="presentation", either of which should cause a screen reader to ignore the element. Also note that while the WAVE scanner consistently cites this as an issue, the AXE scanner does not.

tanc’s picture

Version: 8.x-2.6 » 8.x-3.x-dev

Moving this into 3.x branch to look into as part of the release

tanc’s picture

paulpopus’s picture

I'm not sure that this is an issue.
As mentioned all the buttons have `aria-hidden=true` and `role=presentation`
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Tec...
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Tec...

The first one removes it from the accessibility tree and the second one removes any semantic meaning for it. WAVE incorrectly reports this as an issue it seems.

I'm not convinced it is actually an issue especially as other tools don't report it.

tanc’s picture

Status: Active » Closed (works as designed)

This has definitely been talked about in the mmenu library (which creates those empty buttons): https://github.com/FrDH/mmenu-js/issues/817
Also: https://github.com/govau/dta-gov-au/issues/126
And: https://github.com/govau/dta-gov-au/issues/126

The conclusion being that as @paulpopus mentioned this is not an accessibility issue, but it is just a WAVE scanner issue. A proposed solution if your site needs to pass WAVE's accessibility testing is to inject some text into those buttons with JavaScript. I think it's not worth doing in this module as it increases the maintenance burden and is not actually helping real users.

If you feel strongly that this should be fixed I suggest opening another issue with the mmenu library with a request to add appropriate text to the buttons and a reasoning why this should be done.

Thanks for your input everyone!