Skip to main content

React analyzer

React Accessibility

Syntactic accessibility checks on the DOM elements a file renders: missing names and labels, mouse-only click handlers, removed focus outlines, invalid roles, skipped headings.

accessibility react-accessibility

React Accessibility

Syntactic accessibility checks on the DOM elements a file renders: missing names and labels, mouse-only click handlers, removed focus outlines, invalid roles, skipped headings.

A missing label, a click handler only a mouse can reach or a removed focus outline shuts out people who use a screen reader or a keyboard. These are visible in the JSX, so they can be reported before the code ships. Each check cites the WCAG 2.2 success criterion it relates to.

The analysis reads one file and judges only DOM elements (lower-case JSX tags). A capitalised tag is a component whose output is in another file; it is never treated as the DOM element it is named after. Where a fact could be supplied from outside the element (a spread attribute, an id passed in by the parent) the check stays silent.

The analysis does not state a WCAG conformance level. Conformance is a property of a page, and most criteria (contrast, media alternatives, focus order, timing) cannot be judged from one file's syntax. The result reports the checks that ran, the findings, and the level of the most basic criterion that failed.

Severity guide

info
Advisory: a pattern worth a look that is not a barrier by itself.
warning
A barrier for some users, or a likely one that depends on content this file does not show.
critical
A click handler on an element that nothing can focus: keyboard users cannot reach it.

Remediation

Address the flagged pattern; the message field describes the specific instance.

Prefer native elements (button, a, label, input) over generic ones with handlers: they bring focus, keyboard activation and semantics with them.

Documentation