Lint Rules

noDistractingElements (since v11.0.0)

Enforces that no distracting elements are used.

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, the following elements are visually distracting: <marquee> and <blink>.

Examples

Invalid

<marquee/>
nursery/noDistractingElements.js:1:1 lint/nursery/noDistractingElements  FIXABLE  ━━━━━━━━━━━━━━━━━━

   Don't use the 'marquee' element.
  
  > 1 │ <marquee/>
   ^^^^^^^^^^
    2 │ 
  
   Visually distracting elements can cause accessibility issues and should be avoided.
  
   Suggested fix: Remove the 'marquee' element.
  
    1 │ <marquee/>
  ----------
<blink/>
nursery/noDistractingElements.js:1:1 lint/nursery/noDistractingElements  FIXABLE  ━━━━━━━━━━━━━━━━━━

   Don't use the 'blink' element.
  
  > 1 │ <blink/>
   ^^^^^^^^
    2 │ 
  
   Visually distracting elements can cause accessibility issues and should be avoided.
  
   Suggested fix: Remove the 'blink' element.
  
    1 │ <blink/>
  --------

Valid

<div/>