paypal / AATT

Automated Accessibility Testing Tool
BSD 3-Clause "New" or "Revised" License
602 stars 106 forks source link

"Anchor element found with a valid href attribute" message (H91) - does not appear to be a valid failure when aria-label is present #29

Closed alexinalexandria closed 5 years ago

alexinalexandria commented 7 years ago

When running AATT test tool, in Section508 mode, against the application I am getting, the following HTML code snippet is throwing an error:

Snippet:

\<a href="/application/some.action.do" accesskey="q" aria-label="Do Something Quickly" role="menuitem"> ...\</a>

Message:

Anchor element found with a valid href attribute, but no link content has been supplied.

Technique: H91 Rule: Section,1194.22 (l)

According to our development team, this is a "false positive", as the aria-label is supplying the necessary accessible name.

That leads me to ask: Is the above error (in this condition) a true Section 508 failure, or is it a false positive?

For the purpose of the tests that I am running, I can "bypass" this failure by modifying the code locally to exclude the failure condition (at least when aria-label is either not present or does not have a value).

Thoughts?

mpnkhan commented 7 years ago

Section 508 is not updated to latest checks like aria-label and aria-labelledBy. After section 508 refresh, it would be better to follow WCAG 2.0 Level AA (AATT default) rules.

See: https://www.section508.gov/content/build/website-accessibility-improvement/WCAG-conformance

alexinalexandria commented 7 years ago

Thanks for responding. I will take this into consideration and present this to my team.