ariaProps
Reports invalid ARIA properties.
✅ This rule is included in the jsx logical preset.
If a DOM property begins with aria-, it can only be valid if it’s listed in the WAI-ARIA States and Properties specification.
Any other property beginning with aria- is considered invalid and will not be handled propertly by a browser.
Common mistakes include misspelling property names, such as aria-labeledby instead of aria-labelledby.
This is required for WCAG 4.1.2 compliance.
Examples
Section titled “Examples”<input aria-labeledby="address_label" /><div aria-invalid-prop="true" /><button aria-labelled="Submit" /><input aria-labelledby="address_label" /><div aria-label="Section" /><button aria-pressed="true" />When Not To Use It
Section titled “When Not To Use It”You should always use this rule to ensure ARIA properties are valid.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
jsx-a11y/aria-props - Oxlint:
jsx_a11y/aria-props
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.