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-roledescription is flagged as invalid #9113

Closed
CamiloGarciaLaRotta opened this issue Apr 2, 2019 · 16 comments
Closed

aria-roledescription is flagged as invalid #9113

CamiloGarciaLaRotta opened this issue Apr 2, 2019 · 16 comments
Labels
chillin ❄ PSI/LR PageSpeed Insights and Lightrider upstream-action-required

Comments

@CamiloGarciaLaRotta
Copy link

For the following website: https://camilogarcialarotta.github.io/
The message is:

`[aria-*]` attributes are not valid or misspelled

aria-roledescription is a valid tag as per: https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription

@robdodson
Copy link
Contributor

Thanks for the ticket! We may be running an older version of axe that doesn't pick this up. Possibly related to #7496

@paulirish
Copy link
Member

@CamiloGarciaLaRotta i updated the version of axe and indeed the result did change...

"[aria-*] attributes are not valid or misspelled" is now passing..

BUT the exact same elements are failing a different rule: "[aria-*] attributes do not match their roles". This rule was passing previously.

image

@robdodson
Copy link
Contributor

@WilcoFiers, @dylanb are y'all able to see anything that looks fishy in that output?

@paulirish
Copy link
Member

These elements have a role of either list or listitem and apparently aria-roledescription isn't a valid attribute on these roles?

@paulirish
Copy link
Member

@WilcoFiers @straker I have a feeling like the recent dequelabs/axe-core#1382 may resolve this ?

@robdodson
Copy link
Contributor

These elements have a role of either list or listitem and apparently aria-roledescription isn't a valid attribute on these roles?

Based on a quick read of the spec aria-roledescription seems valid on any element that has a role. I thought the point of it was to help more clearly define the role:

<div role="button" tabindex="0" aria-roledescription="attachment button">family_reunion.jpg</div>

And it's listed in the inherited properties tables for listitem and list.

@straker
Copy link

straker commented Apr 17, 2019

I'll take a look at this for axe. As far as I'm aware in axev3.2.2, aria-allowed-attr should always pass on aria-roledescription. aria-allowed-attr should pass on aria-roledescription for a handful of supported elements/roles across all browsers, throw an incomplete result if it isn't on one of those elements (for manual review), or fail if on an element without a role. But it doesn't seem to be the case if it's throwing an error instead of an incomplete for unsupported elements.

@robdodson robdodson transferred this issue from GoogleChrome/web.dev Jun 3, 2019
@robdodson robdodson added the PSI/LR PageSpeed Insights and Lightrider label Jun 3, 2019
@robdodson
Copy link
Contributor

Moved this over to the Lighthouse repo. Lighthouse was crashing for my in Canary so I wasn't able to test again :\

@patrickhulce
Copy link
Collaborator

Latest Lighthouse (axe-core 3.2.2), fails on "[aria-*] attributes do not match their roles" (aria-allowed-attr).

image

This is also reproducible in the axe extension, so we'll need a fix in axe-core for this.
image

@patrickhulce
Copy link
Collaborator

@straker did you already file any issue for this we can reference or do we need to file one?

@pepinho24
Copy link

Hello,

Is it possible that this is related to the fact that a role="combobox" with aria-readonly attribute fails with the [aria-*] attributes do not match their roles when running the Lighthouse audit?

It used to be not allowed in ARIA 1.0, but is allowed in ARIA 1.1.

I have checked the source code of the AXE you are using and it seems it is not added: https://github.com/dequelabs/axe-core/blob/a4b524084cb8fd61e5ac802b3b6bc7a0d5f86668/lib/commons/aria/index.js#L436

The same is observed with role="listbox" also.

@straker
Copy link

straker commented Jun 4, 2019

@connorjclark
Copy link
Collaborator

Issue has been resolved.

@Abdull
Copy link

Abdull commented Apr 17, 2020

Issue has been resolved.

In which Lighthouse version is this issue supposed to be resolved?

When running Lighthouse 5.7.0 with Chrome 81, I still get [aria-*] attributes do not match their roles for the following websites:

@patrickhulce
Copy link
Collaborator

@Abdull fixed in 6.0.0-beta.0 not yet released to Chrome.

@godanny86
Copy link

Ah just found: https://web.dev/lighthouse-whats-new-6.0/, so pretty soon this fix will be in Chrome Stable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chillin ❄ PSI/LR PageSpeed Insights and Lightrider upstream-action-required
Projects
None yet
Development

No branches or pull requests

9 participants