WCAG 2.2.2 Pause, Stop, Hide — Testing Guide for Mobile & Web Apps
WCAG 2.2.2 requires that any moving, blinking, or auto-updating information on a web page or application must have a mechanism for the user to pause, stop, or hide it. This applies to content that upd
Ensuring Compliance with WCAG 2.2.2: Pause, Stop, Hide
WCAG 2.2.2 requires that any moving, blinking, or auto-updating information on a web page or application must have a mechanism for the user to pause, stop, or hide it. This applies to content that updates automatically over a period of time. The goal is to prevent users from being distracted, disoriented, or unable to interact with the content due to involuntary movement.
Why WCAG 2.2.2 Matters
This criterion is critical for users with a wide range of needs.
- Cognitive Disabilities: Individuals with attention deficit disorders, learning disabilities, or cognitive impairments can find auto-updating content highly distracting, making it difficult to focus on essential information.
- Epilepsy: Flashing or blinking content can trigger seizures in individuals with photosensitive epilepsy.
- Motor Impairments: Users who have difficulty with precise or rapid movements may struggle to interact with content that moves or updates before they can complete an action.
- Elderly Users: Older users may experience slower reaction times or visual processing, making it challenging to keep up with dynamic content.
- General User Experience: Even users without disabilities can find auto-updating content annoying or intrusive, especially when trying to read, fill out forms, or complete tasks.
Failure to comply can lead to exclusion and frustration for a significant portion of your user base, potentially impacting legal compliance under regulations like the EU's European Accessibility Act (EAA) and the Americans with Disabilities Act (ADA) in the United States.
Common Violations and Examples
Violations of WCAG 2.2.2 typically manifest in interactive elements that move without user initiation or control.
#### Mobile App Violations
- Auto-Scrolling Image Carousels: A common offender. If an image carousel on a product listing page automatically advances to the next image every 5 seconds without a visible "pause" or "stop" button, it violates the criterion. Users may not have enough time to read the product description or view the current image before it changes.
- Live Score Updates in Sports Apps: An app displaying live sports scores that update every few seconds without a pause mechanism can be overwhelming. Users trying to follow specific game details might miss crucial information if they can't freeze the display.
- Rotating Advertisements: Banner ads that automatically cycle through multiple promotions without a way to stop them can be highly distracting and may obscure other content on the screen.
#### Web App Violations
- News Ticker Feeds: A news website with a horizontally scrolling ticker at the top of the page that continuously cycles through headlines without a pause button. Users cannot stop to read a particular headline that interests them.
- Animated Promotional Banners: A website featuring a large, animated banner on its homepage that cycles through product highlights. If there's no "stop" or "pause" control, users might find it difficult to interact with other elements on the page, especially if the animation is large or visually dominant.
- Countdown Timers for Sales: An e-commerce site displaying a countdown timer for a limited-time sale that automatically updates every second. While intended to create urgency, if it cannot be paused, users might be unable to complete their purchase before the timer runs out if they need to verify details or perform other actions.
Testing for WCAG 2.2.2 Compliance
Ensuring compliance requires a combination of manual inspection and automated tooling.
#### Manual Testing Steps
- Identify Dynamic Content: Browse your application thoroughly, looking for any elements that move, blink, scroll, or update automatically without user interaction. This includes carousels, tickers, animations, auto-refreshing data, and countdown timers.
- Look for Controls: For each piece of dynamic content identified, search for explicit controls:
- Pause Button: A button or icon that stops the motion or update.
- Stop Button: A button or icon that halts the motion or update permanently until reactivated.
- Hide Control: A mechanism to dismiss or hide the dynamic content entirely.
- Test Controls: Activate any found controls to ensure they function as expected. Verify that the content stops or pauses.
- Time-Outs: If there are no explicit controls, observe the content. Does it update or move continuously? If it does, it's a potential violation. Note the frequency of updates if possible.
- User Interaction: Try interacting with other elements on the page while the dynamic content is active. Does the dynamic content interfere with your ability to focus or act?
#### Automated Tools
While manual testing is essential for nuanced understanding, automated tools can efficiently identify potential issues.
- Browser Developer Tools: Many browser developer tools can highlight elements that are actively animating or updating.
- Accessibility Scanners: Tools like Lighthouse (integrated into Chrome DevTools) and axe DevTools can flag certain types of blinking or flashing content, though they may not always catch complex auto-updating scenarios.
- SUSA (SUSATest) Platform: SUSA autonomously explores your application, identifying elements that update or move. Its persona-based testing, particularly with the Impatient and Elderly personas, can help uncover issues where dynamic content hinders task completion. SUSA also auto-generates regression tests that can include checks for the presence and functionality of pause/stop controls.
#### Mobile-Specific Considerations
- Android: Observe animations, auto-scrolling lists, and any real-time data feeds. Test for the presence of explicit pause/stop buttons. Consider the Curious and Novice personas; they might be easily distracted or confused by unexpected movement.
- iOS: Similar to Android, examine all dynamic elements. The Teenager persona might find fast-moving content engaging, but ensure it doesn't impede critical information access.
Fixing WCAG 2.2.2 Violations
The primary fix involves implementing user-controllable mechanisms.
- Implement Pause/Stop/Hide Controls:
- For Carousels: Add "Previous," "Next," and "Pause" buttons. A "Pause" button should ideally resume when hovered over or clicked again.
- For Tickers/Scrolling Text: Include "Pause" on hover and a "Stop" button.
- For Animated Graphics: Provide a clear "Pause" or "Close" button.
- For Auto-Refreshing Data: Offer a manual refresh button and potentially a way to temporarily disable auto-refresh.
- Limit Animation Duration: If an animation is short and non-essential, consider whether it's needed at all. If it is, ensure it can be stopped.
- Avoid Flashing Content: Strictly avoid content that flashes more than three times per second, as this is a seizure risk. If flashing is unavoidable for critical alerts, ensure it can be stopped immediately.
#### Code Examples (Conceptual)
JavaScript (for a web carousel):
// Assuming a carousel library with pause/play functionality
const carousel = document.querySelector('.carousel');
const pauseButton = document.getElementById('carousel-pause');
const stopButton = document.getElementById('carousel-stop'); // Optional
// To pause on click
pauseButton.addEventListener('click', () => {
// Call the carousel library's pause method
carousel.pause();
pauseButton.textContent = 'Play'; // Update button text
});
// To resume on click (if pause was clicked)
// Add similar logic for resume/play functionality.
// For continuous scrolling, you might implement a hover-to-pause:
carousel.addEventListener('mouseenter', () => {
carousel.pause();
});
carousel.addEventListener('mouseleave', () => {
// Only resume if not explicitly paused by a click
if (!isManuallyPaused) {
carousel.play();
}
});
Mobile (Conceptual - Android with Kotlin):
For auto-scrolling views (e.g., ViewPager2 with auto-scrolling enabled):
// Assuming you have a ViewPager2 and want to control auto-scrolling
val viewPager = findViewById<ViewPager2>(R.id.viewPager)
val pauseButton = findViewById<Button>(R.id.pauseButton)
// Logic to stop auto-scrolling
pauseButton.setOnClickListener {
viewPager.isUserInputEnabled = false // Disables user swiping temporarily
// If using a custom auto-scroll mechanism, stop its timer here.
// Many libraries provide a 'stopAutoScroll()' method.
// For built-in ViewPager2, you might need a custom adapter or handler.
Toast.makeText(this, "Auto-scroll paused", Toast.LENGTH_SHORT).show()
}
// Logic to resume auto-scrolling
// Add a resume button or logic for when user interaction is allowed again.
How SUSA Checks for WCAG 2.2.2 Compliance
SUSA's autonomous exploration engine is designed to detect and analyze dynamic content.
- Autonomous Exploration: When you upload an APK or web URL, SUSA's bots navigate your application, simulating user journeys. They actively identify elements that move, blink, or update automatically.
- Persona-Based Testing: SUSA employs 10 user personas, including the Impatient and Elderly personas. These personas are programmed to interact with the application in ways that highlight issues with dynamic content. An impatient persona will try to complete tasks quickly, becoming frustrated if blocked by unpausing content. An elderly persona might have slower reaction times, making it difficult to keep up with fast-moving information.
- Violation Detection: SUSA flags instances where dynamic content is present without a clear pause, stop, or hide mechanism. This includes identifying auto-scrolling carousels, news tickers, and other continuously updating UI components.
- Flow Tracking: For critical user flows like login, registration, or checkout, SUSA monitors for any disruptions caused by dynamic content. A flow might be marked as failing if a user cannot complete it due to an unpausible animation or update.
- Coverage Analytics: SUSA provides per-screen element coverage, helping you identify screens with significant dynamic elements that might require specific attention for WCAG 2.2.2 compliance.
- Test Script Generation: Crucially, SUSA auto-generates Appium (Android) and Playwright (Web) regression test scripts. These scripts can include assertions to verify the presence and functionality of pause/stop controls for identified dynamic elements, ensuring that fixes remain effective over time.
- Accessibility Persona Testing: Beyond the generic personas, SUSA's dedicated Accessibility persona specifically tests for WCAG compliance, including dynamic content issues as per WCAG 2.1 AA standards, which encompasses the requirements of 2.2.2.
By integrating SUSA into your QA process, you gain an automated yet comprehensive approach to identifying and rectifying WCAG 2.
Test Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free