- Success Criterion 3.2.2
- Conformance level A
File Selection That Auto-Submits the Form With No Warning
3.2.2 — On Input
Scenario
Setting
A car-rental site's checkout flow
What’s wrong
File input auto-submitting on selection with no advisement.
Example
<input type="file" id="license-upload" onchange="document.forms.checkout.submit()"> Why it matters
Choosing a driver's license photo submits the entire rental checkout instantly, before the renter can review insurance options or confirm the pickup date.
How to test
Select a file in a file input: if the form auto-submits on selection with no prior advisement, it fails.
How to fix
File selection should populate the field only; require a separate submit action to finalize the booking.
<input type="file" id="license-upload">
<button type="submit">Complete Booking</button> Outcome
A renter uploads their license and reviews the whole booking before submitting it.
Who is affected
Users relying on screen readers or switch devices to select a file can't back out or double-check other fields before the form is already gone.
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