-
Notifications
You must be signed in to change notification settings - Fork 788
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 attributes must conform to valid values, print whichever is the affected attribute #4576
Comments
Update:
It would be super helpful if it mentioned which attribute is invalid, so I actually could fix it. |
:
in aria-controls, aria-labelledby etc.
Thanks for the issue. Is the site you're seeing the issue on public that I could test it? Without that it may be hard to figure out what we can do. I did notice that the deque university help page link listed in the output points to version 4.4. Axe-core is currently up to 4.10 (https://dequeuniversity.com/rules/axe/4.10/aria-valid-attr-value?application=axeAPI), so I recommend that if you have control of the version that you try with the latest version of axe-core. |
@straker Thanks. The real issue was that We're running an older version of pa11y (which probably uses axe-core 4.4). The latest seem to be at 4.8. |
Letting
|
Product
axe-core
Feature Description
When using axe in pa11y, I get an error saying that an ID is an invalid value for aria-controls, aria-labelledby, etc. This is because it is using React's
useId
, which creates and id containing:
. This is a valid HTML ID, but not a valid CSS selector. From an a11y point of view, this should be considered as a valid value.Worth noting is that I don't get these errors when using axe devtools.
Related issues:
pa11y/pa11y#711
facebook/react#26839
Edit: Looking at it again, this might be because of
aria-activedescendant=""
. Looking at the HTML in the browser, this doesn't exist, so it may appear in the testing environment. Maybe reporting which attribute has an incorrect value would be good? Feel free to rename this issue if that is the case.The text was updated successfully, but these errors were encountered: