- Success Criterion 3.2.2
- Conformance level A
Input Event That Unexpectedly Spawns a Popup Window
3.2.2 — On Input
Scenario
Setting
A job board's application form
What’s wrong
Input events opening popups/spawning windows.
Example
resumeField.addEventListener('input', () => {
window.open('/resume-tips', 'tips', 'width=400,height=500');
}); Why it matters
Every keystroke in the resume text field spawns a popup window with tips, so an applicant typing their experience gets repeatedly interrupted by new windows stealing focus.
How to test
Interact with an input control (change a value): if it spawns a popup or new window unexpectedly, it fails.
How to fix
Only open a secondary window from a control the user activates on purpose, never from ordinary typing.
<button type="button" onclick="window.open('/resume-tips', 'tips', 'width=400,height=500')">
Show resume tips
</button> Outcome
An applicant types their resume details without any popup interrupting their train of thought.
Who is affected
Screen reader users get flooded with window-open announcements and lose track of the application form they were filling out.
Learn more
- Understanding Understanding document (opens in a new tab)
Related scenarios
- Form That Submits Itself the Moment the Last Field Is Filled
- Selecting an Option That Opens a New Window With No Warning
- Dropdown That Navigates to a New Page on Selection
- Checking a Box That Reloads the Page and Loses Entries
- Country Selector That Re-Renders the Form and Drops Focus
- Search Box That Auto-Navigates Once Enough Characters Are Typed