axe-core
axe-core copied to clipboard
Rule 'landmark-complementary-is-top-level' does not reflect behavior
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.
Thanks Adrian. You're absolutely correct. The documentation here doesn't reflect what axe-core does. <aside>
shouldn't ever really be failed by this rule. The problem can only really occur from using role="complementary"
in the wrong place. Our docs are wrong on this.
I just ran into this. I don’t think this should be a fail (or best practice violation). ARIA 1.2 does not limit the use of role=complementary in any way that I can see.
https://www.w3.org/TR/wai-aria-1.2/#complementary
@WilcoFiers we're at axe 4.8 with the same issues... can Deque please update this incorrect rule for 4.9?
@jamieherrera thanks for the reminder. I've added this ticket to the 4.9 milestone so we don't forget about it again.