openfed / AccessibilityCheck

BOSA Accessibility Check is a client-side JavaScript application that checks a HTML document or source code, and detects violations of a defined coding standard. Comes with standards that cover the three conformance levels of the W3C's Web Content Accessibility Guidelines (WCAG) 2.1 and the U.S. Section 508 legislation.
https://openfed.github.io/AccessibilityCheck/
BSD 3-Clause "New" or "Revised" License
24 stars 7 forks source link

Accessibility Checker doesn't take display:none into account #11

Closed bdeclerc closed 4 years ago

bdeclerc commented 5 years ago

On https://accessibility.belgium.be/language_selection_page it gives an error because of an invalid skiplink, but the skiplink has display:none CSS property so is not used/usable - this should not result in an error condition.

roelvangils commented 5 years ago

Indeed. The skip link itself is not part of the accessible tree (display: none takes it out), so it doesn't point to anything.

HTML CodeSniffer reports:

This link points to a named anchor "main-content" within the document, but no anchor exists with that name.

aXe/Lighthouse do not report this as an error. Maybe we should file the issue in the HTML CodeSniffer repository.

bdeclerc commented 5 years ago

You're right, I added a ticket #267 on codesniffer.

bdeclerc commented 5 years ago

Fixed in Codesniffer