Popup Windows Generated by Page Loads or Undetermined Actions
WCAG Focus: WCAG 3.2.5 (AAA), 3.2.2 (A), 2.1.2 (A)
Opening a new browser window or overlay popup automatically on page load—or when a user merely focuses or hovers over an element—breaks the visitor’s mental model of where they are. In WordPress, promotional scripts, legacy ads, and aggressive opt-in plugins commonly spawn popups before a user has finished orienting themselves on the page.
Why This Pattern Violates WCAG
WCAG 3.2.5 Change on Request (Level AAA) requires that changes of context, such as launching a new window or modal, occur only when the user explicitly requests them.
WCAG 3.2.2 On Input (Level A) is violated if changing a form control or moving focus triggers an unexpected popup window without prior warning.
For screen reader and screen magnification users, a popup spawned on page load steals focus without explanation, obscures the underlying page, and often leaves no clear keyboard path back to the original reading position.
Code Comparison
Inaccessible Script (Spawns Popup on Load)
<script>
window.addEventListener('load', function () {
window.open('/newsletter-offer/', 'promo', 'width=500,height=400');
});
</script>
Compliant User-Triggered Disclosure Button
<button type="button" id="open-newsletter-btn" aria-haspopup="dialog">
Subscribe to accessibility updates (opens dialog)
</button>
How to Fix It in WordPress
- Remove window.open() calls attached to load, focus, or hover events.
- Trigger dialogs or new windows only from explicit button or link clicks, and inform users in the link or button label when a new window opens.
- When using an inline modal dialog, manage focus inside the dialog and return focus to the triggering button upon close.
Finding This Issue Automatically
Third-party WordPress marketing scripts and theme add-ons often bury onload or focus-triggered window.open() calls deep inside bundled JavaScript. The WP ADA Compliance Check plugin inspects rendered pages and theme files for unprompted popup patterns, helping your team catch intrusive context changes early rather than discovering them through user complaints.
WCAG References & Supporting Materials
WCAG Success Criteria
- Understanding WCAG 3.2.5 Change on Request (Level AAA)
- Understanding WCAG 3.2.2 On Input (Level A)
- Understanding WCAG 2.1.2 No Keyboard Trap (Level A)
Supporting Documentation & Guides
- W3C Failure F22: Opening windows that are not requested by the user — Covers unexpected popup windows and unannounced new-window opens under WCAG 3.2.5.
- W3C Technique G200: Opening new windows and tabs only when necessary — Limiting new-window links and warning users when links open externally or in non-HTML formats.
Subscribe
Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

