Reviewed October 17, 2026
Shopify image zoom and lightbox accessibility, fixed step by step
Product image zoom is where keyboard users get trapped and screen reader users get lost. How zoom triggers, lightbox dialogs, and close controls should behave, and how to test yours.
Why zoom breaks for keyboard users first
On many product pages, zoom activates only on mouse hover or on a click target that is not a real button, so keyboard users cannot open it at all. Once open, the lightbox often fails the basic dialog rules: focus stays on the page behind, the tab key wanders into the dimmed background, and there is no visible way to close the view except a tiny X that requires a mouse.
Each failure is small in isolation and together they make the highest intent page on the store unusable for detail checking, which is precisely what zoom exists for. Shoppers who cannot inspect fabric, stitching, or labels up close are being asked to buy blind.
What correct behavior looks like
The zoom trigger should be a button, reachable by tab, with a label like zoom image of product name. Activating it opens a dialog that takes focus, keeps tab cycling inside itself, and closes with the Escape key as well as a labeled close button. Closing returns focus to the trigger, so the user lands back where they started instead of at the top of the page.
Inside the lightbox, previous and next controls need text labels, the image needs alt text that describes what zooming reveals, and pinch or drag gestures must have button equivalents for zooming in and out. None of this changes the mouse experience at all.
Finding the problems in your theme
Test with the keyboard alone: unplug or ignore the mouse, tab to the product image, and try to open zoom, move between images, zoom in, and get out again. Note every point where you are stuck, where focus disappears, or where the visible focus outline vanishes. Then repeat the open and close cycle with a screen reader and listen to whether the dialog announces itself.
Automated tools catch only part of this. They can spot a missing button label, but the focus trap and the return of focus are behavior, and behavior needs a human with a keyboard. Twenty minutes on your best selling product template covers most stores, since product pages share one template.
Fixing it, in order
Start with the trigger: convert the clickable image wrapper into a proper button or add a visible zoom button beside the gallery. Next, the dialog mechanics: most modern lightbox libraries handle focus trapping and Escape correctly, so swapping a home rolled lightbox for a maintained one is often the fastest honest fix. Last, labels and alt text, which are content work you can do today.
If your theme is heavily customized, ask your developer to test the fix with keyboard only before shipping. Accessibility regressions in galleries are common because visual QA passes while focus order quietly breaks. The keyboard test is the acceptance test, not an optional extra.
Related reading
If this topic is useful, these earlier guides go deeper on connected questions: Shopify color contrast for sale badges, buttons, and banners that everyone can read, Making a Shopify announcement bar accessible without hiding the offer, and Focus visible on Shopify: why keyboard shoppers need to see where they are.
Frequently asked questions
Is hover to zoom accessible if there is also a click option?
Hover alone excludes keyboard and touch users. If clicking the image opens an accessible lightbox with a labeled button trigger, hover zoom becomes a bonus rather than a barrier. The test is whether every action the mouse offers can be completed with a keyboard.
What should the alt text say for zoomed product images?
It should describe what the closer view shows: the weave of the fabric, the clasp mechanism, the label details. Repeating the product name alone wastes the moment. For purely decorative gallery angles, shorter alt is fine, but detail shots deserve real description.
Does a lightbox need to trap focus?
Yes, while it is open. Focus moving behind a modal dialog leaves keyboard users lost in a page they cannot see properly. A proper trap cycles tab within the dialog until it closes, then returns focus to the element that opened it.
Can I test zoom accessibility without a screen reader?
Mostly, yes. The keyboard only test exposes traps, missing triggers, and invisible focus, which are the majority of zoom failures. A screen reader pass adds the announcement checks: whether the dialog is named and state changes are spoken. Do the keyboard pass first; it needs no special tools.