WCAG 3.2.1: On Focus
Level AQuick answer: Focusing an element should not unexpectedly change context, navigate, or open new content.
What This Means
On ecommerce sites, On Focus usually shows up in repeating storefront components such as product cards, PDP media, search results, cart drawers, checkout forms, and support content. If the live experience depends on patterns like tabbing into a size dropdown automatically changes the pdp and scroll position. or focus on a promo input launches a modal before the user types., disabled shoppers can lose context or get blocked before purchase.
This criterion matters because D2C teams often fix the homepage but miss reusable app blocks, campaign pages, and mobile-specific UI. The practical standard is simple: build the same outcome for keyboard users, screen-reader users, low-vision users, and anyone relying on captions, labels, structure, or predictable behavior.
For Shopify, WooCommerce, and custom storefronts, the fastest remediation path is usually template-level work. Fix the repeated component once, then retest every place it appears across browse, buy, and post-purchase journeys.
Common Violations on Ecommerce Sites
- Tabbing into a size dropdown automatically changes the PDP and scroll position.
- Focus on a promo input launches a modal before the user types.
- Account settings tabs navigate away as soon as they receive focus.
- Search suggestions page loads on focus instead of after user input.
How to Fix It
Start with the live customer journey, not isolated components in Storybook or Figma. Audit the problem on category pages, product detail pages, quick views, cart, checkout, account, and help templates.
- Trigger major changes only after a deliberate action like click, Enter, or selection.
- Let focus act as exploration, not commitment.
- Prevent focus handlers from opening modals or navigating immediately.
- Retest custom selects, tabs, and accordions for focus side effects.
On Shopify, fix the theme section or app block that repeats the defect. On WooCommerce and WordPress, update the template override or plugin output. In custom React or headless storefronts, move the fix into shared components so merchandisers cannot reintroduce the issue with every campaign.
Code Example
<!-- Before -->
select.addEventListener('focus', goToVariant);
<!-- After -->
select.addEventListener('change', goToVariant);
FAQ
What is WCAG 3.2.1?
Focusing an element should not unexpectedly change context, navigate, or open new content.
How does WCAG 3.2.1 affect ecommerce sites?
It affects ecommerce anywhere shoppers interact with tabbing into a size dropdown automatically changes the pdp and scroll position. and focus on a promo input launches a modal before the user types. If those patterns are inaccessible, customers can miss product information, fail forms, or abandon checkout.
How to fix WCAG 3.2.1 violations?
Start by auditing the live storefront, then Trigger major changes only after a deliberate action like click, Enter, or selection.; Let focus act as exploration, not commitment.; Prevent focus handlers from opening modals or navigating immediately.. Prioritize templates and apps that repeat the issue across product, cart, checkout, and account pages.
Check if your store passes WCAG 3.2.1 → Free ADA Compliance Scan