Skip to content

noAriaUnsupportedElements (HTML)

biome.json
{
"linter": {
"rules": {
"a11y": {
"noAriaUnsupportedElements": "error"
}
}
}
}

Disallow ARIA attributes on elements that cannot use them.

ARIA (Accessible Rich Internet Applications) attributes communicate an element’s role and state to assistive technologies. The html, meta, script, and style elements do not support ARIA roles or aria-* attributes, so those attributes provide no usable information.

<meta charset="UTF-8" role="meta" />
code-block.html:1:1 lint/a11y/noAriaUnsupportedElements  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ Avoid the role attribute and aria-* attributes when using meta, html, script, and style elements.

> 1 │ <meta charset="UTF-8" role="meta" />
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │

ℹ Using role on elements that do not support them can cause issues with screen readers.

ℹ Unsafe fix: Remove the role="meta" attribute.

1 │ <meta·charset="UTF-8"·role="meta"·/>
│ ------------
<html aria-required="true"></html>
code-block.html:1:1 lint/a11y/noAriaUnsupportedElements  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ Avoid the role attribute and aria-* attributes when using meta, html, script, and style elements.

> 1 │ <html aria-required="true"></html>
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │

ℹ Using aria-* on elements that do not support them can cause issues with screen readers.

ℹ Unsafe fix: Remove the aria-required="true" attribute.

1 │ <html·aria-required="true"></html>
│ --------------------
<meta charset="UTF-8" />
<html></html>