Skip to content

useValidAriaProps (JavaScript)

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

Disallow unknown aria-* attributes.

ARIA (Accessible Rich Internet Applications) attributes describe an element to assistive technologies. Browsers ignore misspelled or unknown ARIA attributes, so users may not receive the element’s intended name, state, or other accessibility information.

<input className="" aria-labell="" />
code-block.jsx:1:1 lint/a11y/useValidAriaProps  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ The element contains invalid ARIA attribute(s)

> 1 │ <input className="" aria-labell="" />
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │

ℹ aria-labell is not a valid ARIA attribute.

> 1 │ <input className="" aria-labell="" />
│ ^^^^^^^^^^^^^^
2 │

ℹ Unsafe fix: Remove the invalid aria-* attribute.
Check the list of all valid aria-* attributes.

1 │ <input·className=""·aria-labell=""·/>
│ ---------------
<div aria-lorem="foobar" />;
code-block.jsx:1:1 lint/a11y/useValidAriaProps  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ The element contains invalid ARIA attribute(s)

> 1 │ <div aria-lorem="foobar" />;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │

ℹ aria-lorem is not a valid ARIA attribute.

> 1 │ <div aria-lorem="foobar" />;
│ ^^^^^^^^^^^^^^^^^^^
2 │

ℹ Unsafe fix: Remove the invalid aria-* attribute.
Check the list of all valid aria-* attributes.

1 │ <div·aria-lorem="foobar"·/>;
│ --------------------
<input aria-label="Search" />