landmark-complementary-is-top-level

Complementary landmark must be top-level

manualconfidence: mediumseverity: minoroperable

Checks that the complementary landmark (role="complementary" or an <aside> that keeps its implicit role) is not nested inside another landmark region.

Applies to. Applies whenever the page contains at least one element carrying the complementary role: explicit role="complementary", or an <aside> that keeps its implicit role. A custom element whose ElementInternals give it a landmark role (this.attachInternals().role), with no role attribute naming another, is a landmark as a native element with that role is.

Expectation. No complementary candidate has an ancestor that is itself a landmark region. Complementary content supports the main content of the page and sits beside it; nested inside another landmark it is a section of that landmark instead, which is not what landmark navigation announces.

Examples

pass
<aside>Related links</aside>

The complementary landmark is not nested inside any other landmark.

can't tell
<nav aria-label="Section navigation">
<div role="complementary">Related links</div>
</nav>

A complementary landmark nested inside a navigation landmark.

How to check

When this rule can’t decide, it reports cantTell and leaves the question to a person. Each question it can ask is listed here under its reason code, with the steps to answer it. A finding carries the same steps as howToCheck, in the scan’s language. See Output schema.

LANDMARK_COMPLEMENTARY_NOT_TOP_LEVEL

  1. Find the complementary landmark (an aside or role="complementary") the report names and the landmark it sits inside.
  2. Open a screen reader's landmarks list, or the Accessibility pane, and look at where it appears.
  3. If it sits inside main and has a name, it is the common related-content box; if it sits inside a header, footer, navigation, form or another complementary, note the odd placement.

Pass. The complementary landmark sits at the top level, or is a named related-content box inside main.

Fail. The complementary landmark is nested in an unrelated landmark such as a footer or navigation, which confuses landmark navigation, a best-practice miss under the WAI-ARIA complementary role.

View source