Skip to content

jsx_a11y/no-distracting-elements Correctness

What it does

Enforces that no distracting elements are used.

Why is this necessary?

Elements that can be visually distracting can cause accessibility issues with visually impaired users. Such elements are most likely deprecated, and should be avoided. By default, <marquee> and <blink> elements are visually distracting.

What it checks

This rule checks for marquee and blink element.

Example

Examples of incorrect code for this rule:

jsx
<marquee />
<marquee {...props} />
<marquee lang={undefined} />
<blink />
<blink {...props} />
<blink foo={undefined} />

Examples of correct code for this rule:

jsx
<div />
<Marquee />
<Blink />

References

Released under the MIT License.