Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.03 KB

no-aria-unsupported-elements.md

File metadata and controls

49 lines (33 loc) · 1.03 KB

no-aria-unsupported-elements

✅ The extends: 'recommended' property in a configuration file enables this rule.

Certain reserved DOM elements do not support ARIA roles, states and properties. This is often because they are not visible.

These elements include:

  • html
  • meta
  • script
  • style

This rule enforces that these DOM elements do not contain the role and/or aria-* props.

Examples

This rule forbids the following:

<meta charset="UTF-8" aria-hidden="false" />
<html lang="en" role="application"></html>
<script aria-hidden="false"></script>

This rule allows the following:

<meta charset="UTF-8" />
<html lang="en"></html>
<script></script>

References