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

Documentation for aria-hidden-focus for single element is misleading and not fully correct #3252

Closed
kospl opened this issue Nov 2, 2021 · 6 comments
Labels
pr A pr has been created for the issue rule metadata Issues in the rule metadata code (lib/rules)

Comments

@kospl
Copy link

kospl commented Nov 2, 2021

Product: axe-core

Expectation: <input aria-hidden="true"> failing test for aria-hidden-focus and having clear help message explaining why this element is failing.

Actual: axe core 4.3.5 reports aria-hidden-focus violation with description about its elements (which don't exist).

Motivation: misleading help text made some tech support to think there is false positive with axe rule, because it's mentioning do not contain elements, and there are just one single DOM element, with no other elements that it contains that may be failing this test.


I know it sounds a little bit nerdy, but such help text have to be clear, as it's getting even worse when it's got to Lighthouse: https://github.com/GoogleChrome/lighthouse/blob/8a29854072202807ba54276beb9cdd9f244007b5/lighthouse-core/audits/accessibility/aria-hidden-focus.js#L18

__

minimal repro example:

<input aria-hidden="true">

axe help text: "ARIA hidden element must not contain focusable elements"
Lighthouse title: "[aria-hidden="true"] elements do not contain focusable descendents"

@straker straker added the rule metadata Issues in the rule metadata code (lib/rules) label Nov 4, 2021
@straker
Copy link
Contributor

straker commented Nov 4, 2021

Thanks for the issue. We'll try to update the message to make it more clear.

@TechThomas
Copy link

Hey @straker how is the process going on improving the messaging. We actually just tweeted about this issue https://twitter.com/TechThomas/status/1488413276400922624

@straker
Copy link
Contributor

straker commented Feb 1, 2022

We weren't able to get this into the 4.4.0 release which just went out, but we can try to get it added to 4.4.1.

@TechThomas
Copy link

@straker when will 4.4.1 be expected?

@straker
Copy link
Contributor

straker commented Mar 14, 2022

Sorry, 4.4.1 was released not too long ago but did not include this fix (it was a quick release to fix a bug in 4.4.0). I'm not sure when we plan on releasing the next release, so I'm unable able to say when this will be addressed.

@straker straker added this to the Axe-core 4.5 milestone Mar 14, 2022
@straker straker added the pr A pr has been created for the issue label Mar 25, 2022
@WilcoFiers WilcoFiers removed this from the Axe-core 4.5 milestone May 20, 2022
@padmavemulapati
Copy link

Validated with the latest axe-core, develop branch axe.js source,
It was showing in 4.3.5 , for aria-hidden-focus rule failing description is ""Ensures aria-hidden elements do not contain focusable elements" , below is the screenshot

image

and now it got fixed and the description is appearing as "Ensures aria-hidden elements are not focusable nor contain focusable elements"
image
Source validated to produce this violation is ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr A pr has been created for the issue rule metadata Issues in the rule metadata code (lib/rules)
Projects
None yet
Development

No branches or pull requests

5 participants