No Keyboard Trap
Keyboard focus must be able to move away from any component using only the keyboard — there must be no "trap" where Tab stops moving focus.
What it requires
WCAG 2.0 SC 2.1.2 requires that any component receiving keyboard focus also has a keyboard mechanism for focus to leave it. The most common offenders: modal dialogs that trap focus permanently, custom date pickers with no escape, and embedded videos that capture focus and don't release.
The fix pattern for modals: trap focus inside while open, return focus to the triggering button on close, and listen for the Escape key to close.
Common Shopify failure
Cart drawer that traps Tab focus indefinitely once opened — Escape does nothing, clicking the close X is the only way out (impossible for keyboard-only users). Newsletter modal with no close button reachable by Tab.
How to fix it
AccessComply rewrites cart-drawer and newsletter-modal Liquid templates to handle Escape key, expose a focusable close button as the first or last tab stop, and return focus to the original trigger when closed.
Merchant QA checklist
- Scan the storefront page where this pattern appears: product pages, collection pages, cart drawer, customer-account pages, and any landing page built with theme sections.
- Confirm the issue is fixed in the rendered browser output, not only in the Liquid file. Shopify section settings, app blocks, and third-party scripts can reintroduce the same 2.1.2 failure after a theme edit.
- Re-test the affected component with keyboard navigation and a screen-reader accessibility tree before publishing the theme, especially when the fix changes markup or ARIA attributes.
How AccessComply handles it
AccessComply treats WCAG 2.1.2 as a rendered-storefront issue first. The scanner checks the live DOM and computed styles, maps the finding back to the Shopify theme file that produced it, then classifies the fix as a safe automatic fix. When automation is safe, the app writes the smallest theme-code change needed and keeps the original theme backup available. When merchant judgment is required, the issue is surfaced for manual review instead of pretending the page is fixed.
Primary source: W3C — WCAG 2.0 Understanding 2.1.2