Skip to content
← Back to rules

jsx-a11y/aria-props Correctness

🛠️ An auto-fix is available for this rule for some violations.

What it does ​

Enforces that elements do not use invalid ARIA attributes.

Why is this bad? ​

Using invalid ARIA attributes can mislead screen readers and other assistive technologies. It may cause the accessibility features of the website to fail, making it difficult for users with disabilities to use the site effectively.

This rule includes fixes for some common typos.

Examples ​

Examples of incorrect code for this rule:

jsx
<input aria-labeledby="address_label" />

Examples of correct code for this rule:

jsx
<input aria-labelledby="address_label" />

How to use ​

To enable this rule using the config file or in the CLI, you can use:

json
{
  "plugins": ["jsx-a11y"],
  "rules": {
    "jsx-a11y/aria-props": "error"
  }
}
ts
import { defineConfig } from "oxlint";

export default defineConfig({
  plugins: ["jsx-a11y"],
  rules: {
    "jsx-a11y/aria-props": "error",
  },
});
bash
oxlint --deny jsx-a11y/aria-props --jsx-a11y-plugin

Version ​

This rule was added in v0.0.22.

References ​