The Mini Cart Drawer Is Where Keyboard Users Lose the Thread
The shopper removes an out of stock item, the cart total changes, a red banner appears at the top of the page, and their screen reader says nothing at all. Visually the error is handled. For a blind shopper the cart just silently changed, and the next thing they hear is a total that does not match the one they were quoted a minute ago.
The mini cart drawer is the most focus-hostile component in modern ecommerce. WCAG criterion 2.4.3, Focus Order, Level A, requires that focusable elements receive focus in an order that preserves meaning and operability. A drawer that opens while focus stays behind it, or that sends focus back to the top of the page on close, breaks that order twice in one interaction, and criterion 2.1.2, No Keyboard Trap, is waiting if the drawer also fails to let go.
The three failures, in the order users meet them
First, the drawer opens and focus does not move. The visual user sees a panel; the keyboard user is still tabbing through the page underneath it, activating controls they cannot see in context. Second, focus enters the drawer but is not contained, so the tab order wanders out into the dimmed page behind, a tour of elements the interface has declared inactive. Third, the drawer closes and focus resets to the document body, which in practice means the user starts the page again from the first link.
Each failure maps to a criterion: order under 2.4.3, containment and escape under 2.1.2 and the dialog pattern the WAI ARIA Authoring Practices describe, and focus return as part of operability. None of them needs a redesign to fix. All three are behaviour settings in the drawer's script.
What correct behaviour looks like, keystroke by keystroke
On open, focus moves to the drawer's first meaningful element, usually its heading or its close button, and the drawer's title is announced. Tab then cycles inside the drawer: quantity controls, remove buttons, the checkout action, close. Escape closes it, and so does the close button, and on close focus returns to the exact control that opened it, normally the cart button in the header, so the user resumes where they left off.
The background page is inert while the drawer is open: not just dimmed visually, but removed from the tab order and the accessibility tree. Dimming alone is a visual metaphor that assistive technology does not experience.
Why this component keeps shipping broken
Drawers come from theme components and app embeds whose demos are built and tested with a pointer. The drawer looks flawless in every screenshot and every mouse-driven review, and the failure only exists in a modality nobody on the approval chain used. It is the same reason the fix is cheap once found: the defect is in event handling, not in layout or design.
Add one line to the release checklist: open the drawer, close the drawer, complete a quantity change, keyboard only, and note where focus is at each step. A component that passes that test passes the criteria. One that fails it will fail an audit, and it will fail real customers first, silently, at the exact moment they were trying to pay.
Keep reading: Cart Errors That Screen Readers Never Announce Are Cart Errors That Never Get Fixed, The Promo Code Field: Three Labelling Failures That Look Like Design Choices, and Cart Quantity Steppers: The Small Control That Breaks Keyboard Checkout cover the nearby cases in this series.
Frequently asked questions
Where should focus go when a cart drawer opens?
Focus should move into the drawer, to its heading or first control, so keyboard and screen reader users experience the opening the same way visual users do. Leaving focus on the page behind an open modal drawer means the user tabs through content the interface has covered, in an order that makes no sense.
What does WCAG 2.1.2 No Keyboard Trap require here?
It requires that if focus can move to a component by keyboard, it can move away again using only the keyboard. A drawer that captures tab correctly must still release it: Escape and the close button must work, and closing must return focus to the invoking control rather than dropping it at the top of the document.
Should the page behind an open drawer be inert?
Yes. While a modal drawer is open, the background should be removed from keyboard navigation and the accessibility tree, not merely greyed out. Otherwise screen reader users can browse content that is visually presented as unavailable, and focus order under 2.4.3 stops matching the visual order.
How do I test a cart drawer for accessibility quickly?
Unplug the mouse. Add an item, open the drawer with the keyboard, change a quantity, remove an item, and close it. At each step, say out loud where focus is. If you cannot tell, or focus vanishes, or you land back at the top of the page after closing, the drawer fails, regardless of how it scores in an automated scan.