Adding an Accessible Pause Button to FlexSlider Slideshows

Adding an Accessible Pause Button to FlexSlider Slideshows

WCAG Focus: WCAG 2.2.2 (A), 2.1.1 (A), 4.1.2 (A)

FlexSlider is bundled inside dozens of WordPress themes, WooCommerce galleries, and slider plugins, and is almost always initialized with automatic slide rotation enabled. Without a visible, keyboard-accessible Pause/Play control, moving slides violate WCAG 2.2.2 and make surrounding text hard to read for visitors with cognitive, vestibular, or low-vision disabilities.

Why This Pattern Violates WCAG

WCAG 2.2.2 Pause, Stop, Hide (Level A) requires any moving, blinking, or auto-updating information that starts automatically and lasts more than five seconds to provide a mechanism for users to pause, stop, or hide it.

WCAG 2.1.1 Keyboard (Level A) and WCAG 4.1.2 Name, Role, Value (Level A) require that pause control to be a real keyboard-focusable <button> with an accessible label and clear pressed/playing state.

Code Comparison

Inaccessible Auto-Playing FlexSlider Without Pause Control

<div class="flexslider">
  <ul class="slides">
    <li><img src="slide-1.jpg" alt="Spring sale announcement"></li>
    <li><img src="slide-2.jpg" alt="New WordPress accessibility guide"></li>
  </ul>
</div>

Compliant FlexSlider With Keyboard-Accessible Pause Button

<div class="flexslider" role="region" aria-roledescription="carousel" aria-label="Featured announcements">
  <button type="button" class="flex-pause-btn" aria-pressed="false">
    Pause slideshow
  </button>
  <ul class="slides">
    <li><img src="slide-1.jpg" alt="Spring sale announcement"></li>
    <li><img src="slide-2.jpg" alt="New WordPress accessibility guide"></li>
  </ul>
</div>

How to Fix It in WordPress

  • Disable automatic slide advancement where possible, or render a visible <button type="button">Pause slideshow</button> control inside the FlexSlider container.
  • Connect the button to FlexSlider’s pause/play API and update its accessible text or aria-pressed state when toggled.
  • Ensure the Pause button appears early in the focus order and works with both Enter and Space.

Finding This Issue Automatically

Many WordPress themes hardcode FlexSlider initialization scripts without enabling pause controls. The WP ADA Compliance Check plugin automatically detects active FlexSlider slideshows and injects a keyboard-accessible Pause/Play button so your carousels meet WCAG 2.2.2 without rewriting theme templates.

Subscribe

Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

Cart Accessibility Tools
hide