Skip to content

Scrolling text needs a way to stop

  • Rule: axe/marquee
  • Checks: <marquee> elements are deprecated and must not be used
  • WCAG: 2.2.2
  • Fix class: mechanical: A fix needs no authored text or visual decision.
  • People whom moving, blinking or flashing content distracts, disorients or harms.
  • People with cognitive, learning or attention disabilities.
  • People with low vision, who zoom, magnify or need strong contrast.

Replace it with static text, such as a list that shows every item in place. <marquee> is obsolete and gives people no built-in way to pause it.

<ul class="announcements">
<li>Free shipping on orders over $50</li>
<li>New store hours from June 1</li>
</ul>

The content must keep moving, such as a news ticker

Section titled “The content must keep moving, such as a news ticker”

Build it with CSS or script, and give it a visible button that pauses and restarts it, reachable by keyboard. Also pause it while it has hover or focus, and keep it still under prefers-reduced-motion: reduce.

<section class="ticker" aria-label="Headlines">
<button type="button" aria-pressed="false">Pause headlines</button>
<p class="ticker-text">Markets open higher on Monday</p>
</section>

Replacing <marquee> with a CSS animation that has no pause control

Section titled “Replacing <marquee> with a CSS animation that has no pause control”

The rule passes because the element is gone, but text that moves for more than five seconds with no way to pause, stop or hide it still fails WCAG 2.2.2.

axe-core’s documentation of the rule

CORA’s fix guidance adapts content from accessibility-agents, under the MIT License: see its notice.