Certain ARIA roles must be contained by particular parents

Rule ID: aria-required-parent
Ruleset: axe-core 4.7
User Impact: Critical
Guidelines: WCAG 2.1 (A), WCAG 2.0 (A)

Accessibility testing for dev teams - No experience required

Find and fix up to 80% of accessibility issues with axe DevTools Pro. Get started with your free trial today. No credit card needed.

Start for free

Compliance Data & Impact

User Impact

Critical
Minor
Critical

Disabilities Affected

  • Blind
  • Deafblind
  • Mobility

Standard(s)

  • WCAG 2.1 (A)
  • WCAG 2.0 (A)

WCAG Success Criteria [WCAG 2.1 (A)]

  • 1.3.1: MUST: Info and Relationships

WCAG Success Criteria [WCAG 2.0 (A)]

  • 1.3.1: MUST: Info and Relationships

How to Fix the Problem

Ensure all ARIA roles are contained by their required parent element, if any.

The relationship properties available in ARIA are the following:

  • aria-activedescendant
  • aria-controls (used primarily by elements where the role is group, region, or widget)
  • aria-describedby
  • aria-flowto (used primarily to provide alternate reading/tab order to skip past ads or complementary regions)
  • aria-labelledby
  • aria-owns (used primarily to identify which elements belong to the group)
  • aria-posinset
  • aria-setsize

ARIA allows you to communicate relationship information to screen readers, which specifies relationships between items (for example, aria-owns, aria-controls, both of which describe a kind of parent-child relationship where one item owns or controls another).

Why it Matters

For each role, WAI-ARIA explicitly defines which child and parent roles are allowable and/or required. Elements containing ARIA role values missing required parent element role values will not enable assistive technology to function as intended by the developer.

When it is necessary to convey context to the user of assistive technology in the form of hierarchy (for example, the importance of a parent container, item or sibling in a folder tree), and the hierarchy is not the same as the code structure or DOM tree, there is no way to provide the relationship information without the use of ARIA role parent elements.

Rule Description

Certain ARIA roles must be contained by particular parent roles in order to perform the intended accessibility functions.

The Algorithm (in simple terms)

Checks all elements that contain a WAI-ARIA role to ensure that all required parent roles are present

Resources

Other Resources

You may also want to check out these other resources.

  • WAI-ARIA Roles

Refer to the complete list of axe 4.7 rules.

Was this information helpful?

You have already given your feedback, thank you..

Your response was as follows:

Was this information helpful?
Date/Time feedback was submitted:

'; document.getElementById("form_message").innerHTML = checkMarkAnimation + msg + "
"; if (!!window.MSInputMethodContext && !!document.documentMode ) document.getElementById("form_message").innerHTML = checkMark + msg + "
"; else document.getElementById("form_message").innerHTML = checkMarkAnimation + msg + "
"; } if(type === "warning" ) { document.getElementById("form_message").style.color = "#916216"; document.getElementById("form_message").innerHTML = warningIcon + msg + "
"; } if(type === "error" ) { document.getElementById("form_message").style.color = "#b40909"; document.getElementById("form_message").innerHTML = errorIcon + msg + "
"; } document.getElementById("form_message").tabIndex = -1; document.getElementById("form_message").focus(); } function clearMessage() { document.getElementById("form_message").innerHTML = ""; } function showFeedbackForm() { document.getElementById("feedback-form").className = ""; document.getElementById("feedback-info").className = "deque-hidden"; document.getElementById("yesButton").focus(); setTimeout((function (){ document.getElementById("yesButton").focus(); }), 5000); } function hideFeedbackForm() { if( feedbackData ) { document.getElementById("feedback-info").className = ""; showMessage("You have cancelled editing your earlier feedback.", "warning"); } document.getElementById("feedback-form").className = "deque-hidden"; document.getElementById("yesButton").style.display = ""; document.getElementById("noButton").style.display = ""; document.getElementById("noFeedback").className = "deque-hidden"; setTimeout((function() { clearMessage(); }), 4000); }