Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aria-valid-attr-value should call out missing ID references #2621

Closed
straker opened this issue Nov 3, 2020 · 1 comment
Closed

Aria-valid-attr-value should call out missing ID references #2621

straker opened this issue Nov 3, 2020 · 1 comment
Assignees
Labels
fix Bug fixes rule metadata Issues in the rule metadata code (lib/rules)

Comments

@straker
Copy link
Contributor

straker commented Nov 3, 2020

The aria-valid-attr-value rule throws a violation for the following code:

<button aria-labelledby="my name"> </button> <span id="foo">Joe</span>

This is a correct violation as the IDs referenced by the aria-labelledby do not exist on the page. However, our error message makes it seem that the values of the attribute are incorrect, instead of saying that the values are correct values (a space separated list of IDs) but that their reference elements do not exist on the page

"Fix all of the following:
  Invalid ARIA attribute value: aria-labelledby="my name""

We should improve the remediation message for ID reference values to denote the difference between an invalid value and their ID reference element not existing on the page.

@straker straker added fix Bug fixes rule metadata Issues in the rule metadata code (lib/rules) labels Nov 3, 2020
@straker straker self-assigned this Dec 24, 2020
@padmavemulapati
Copy link

Verified with the latest axe-core develop branch code (dated 5th jan 2021).
aria-valid-attr-value is now appearing in the "incomplete" results when the code snippet is
<button aria-labelledby="test">Button</button>
image

I am able to see the results in voilations when verified with axe-core-4.0 version: (reproducing the behaviour)
image

@straker straker closed this as completed Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes rule metadata Issues in the rule metadata code (lib/rules)
Projects
None yet
Development

No branches or pull requests

2 participants