Skip to content

Rule 'landmark-complementary-is-top-level' does not reflect behavior #3586

@aardrian

Description

@aardrian

Product:
axe-core 4.4.2

Rule:
landmark-complementary-is-top-level

Expectation:
The content under the "How to Fix the Problem" heading should not declare there is an issue with <aside> scoped to <main>. It should conform with the update made in axe-core 4.2 to allow <aside> to be scoped to <main>

Actual:
The content under the "How to Fix the Problem" heading reads:

The following example FAILS the Complementary landmarks are at the top level rule:

<main>
 <p>Some text</p>
 <aside><p>An aside</p></aside>
</main>

While testing, I made a pen that confirms Axe correctly does not throw a warning (or any message) for an <aside> scoped to <main>: https://cdpn.io/pen/debug/vYRrpQy

Motivation:
This language and example do not reflect the rule.

It is also wrongly causing some devs to follow the language on the page instead of the rule, the spec, or actual browser support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation changesfixBug fixesrule metadataIssues in the rule metadata code (lib/rules)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions