adobe-accessibility / Accessible-Mega-Menu

A demonstration of how to implement a keyboard and screen reader accessible mega menu as a jQuery plugin.
Apache License 2.0
605 stars 199 forks source link

Main links fail WCAG2 tests in pa11y #60

Open damienmckenna opened 4 years ago

damienmckenna commented 4 years ago

I've found that the HTML structure required by this JS library results in WCAG2 test failures in pa11y

WCAG2AA.Principle2.Guideline2_4.2_4_1.G1,G123,G124.NoSuchId This link points to a named anchor "[link target]" within the document, but no anchor exists with that name.

https://github.com/pa11y/pa11y/wiki/HTML-CodeSniffer-Rules

Unfortunately adding role="button" to the HTML doesn't appease the test because it's so strict.

damienmckenna commented 4 years ago

FYI this can be worked around using the following:

pa11y --standard=WCAG2AA --timeout=120000 --ignore=WCAG2AA.Principle2.Guideline2_4.2_4_1.G1,G123,G124.NoSuchID https://example.om/