JavaScript

JavaScript

Made by DeepSource

Prefer that autoFocus prop is not used on elements JS-0757

Anti-pattern
Minor
Autofix

The issue enforces that the autoFocus prop is not used on elements because autofocusing elements can cause usability issues for sighted and non-sighted users alike.

Bad Practice

<div autoFocus />
<div autoFocus="true" />
<div autoFocus="false" />
<div autoFocus={undefined} />

Recommended

<div />