Skip to content

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

@kospl

Description

@kospl

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    prA pr has been created for the issuerule metadataIssues in the rule metadata code (lib/rules)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions