Certain reserved DOM elements do not support ARIA roles, states and properties.
This is often because they are not visible, for example meta
, html
, script
,
style
. This rule enforces that these DOM elements do not contain the role
and/or
aria-*
props.
This rule takes no options
These elements are passed by this rule
// no problem when the reserved element is not given an illegal prop
<meta/>
// no problem when an illegal props is given to a non-reserved element
<div aria-hidden="true"></div>
These elements are not passed by this rule
// warns when the element should not be given any ARIA attributes
<meta aria-hidden="false"/>
- Google Audit defs AX_ARIA_12