ARIA Role Error
Text
Element has invalid WAI-ARIA role.
Type
Error
Description
This error applies to all elements that have the role attribute. It indicates that the role attribute is not a valid Web Accessibility Initiative - Accessible Rich Internet Applications (WAI-ARIA) role value as defined by the WAI-ARIA specification. Setting a valid role helps ensure that the element is correctly interpreted by screen readers and other assistive technology tools.
To fix this error, set the role attribute to a valid WAI-ARIA role value. Note that abstract WAI-ARIA roles are not valid.
Example
<!—The invalid role will not expose this element as a button. -->
<div role="backbutton" tabindex="0" aria-label="Back" onclick="mouseAction(event)" onkeyup="keyAction(event)" >
<!—Setting the correct role will expose this as a button that can be clicked. -->
<div role="button" tabindex="0" aria-label="Back" onclick="mouseAction(event)" onkeyup="keyAction(event)" >
Related topics
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for