Certain ARIA roles must contain particular children
How to Fix the Problem
Ensure elements including explicit or implicit ARIA roles include required children elements.
The following attribute values indicate relationships between element that
cannot be readily determined from the document structure. The relationships
are linked to characteristics tables that list explicit and implicit
role
attribute values as well as role
attribute
values inherited by nested children elements.
-
aria-activedescendant
-
aria-controls
-
aria-describedby
-
aria-flowto
-
aria-labelledby
-
aria-owns
-
aria-posinset
-
aria-setsize
-
role="combobox"
For similar (opposite) information, refer to Certain ARIA roles must be contained by particular parents.
Why it Matters
For each role, WAI-ARIA explicitly defines which child and parent roles are
allowable and/or required. ARIA role
s missing required child
role
s will not be able to perform the accessibility functions
intended by the developer.
Assistive technology needs to convey the context to the user. For example, in
a treeitem
, it is important to know the parent (container), item,
or siblings in the folder. This can be done in two ways:
- Code order or DOM: The necessary context is often clear from the code order or DOM.
-
ARIA: ARIA (such as
aria-owns
) can be used provide the relationships when the hierarchy is not the same as the code structure or DOM tree.
Rule Description
Some ARIA parent role
values applied to elements must contain
specific child elements and role
values to perform intended
accessibility function.
The Algorithm (in simple terms)
Checks all elements that contain a WAI-ARIA role to ensure that all required children roles are present.
"; 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); }