Minion

How to replace legacy jQuery modals with accessible dialogs

Plan a Shopify modal using theme components or the native dialog element, with clear focus behavior, a close control and useful fallback content.

Reviewed December 2, 2026 · Minion

A modal should help customers complete a focused task, such as checking a size guide, without trapping them in a difficult overlay. Use an established component from your current theme before adding a second modal library.

Choose a maintained approach

The original Reveal tutorial used a separate jQuery plugin. For new development, evaluate the theme's existing dialog component or the browser's native dialog element. A native modal can be opened with showModal() and closed with close().

A custom component still needs design and testing. Native browser behavior is a useful foundation, not a substitute for checking the complete interaction.

Define the accessibility behavior

Give the dialog a clear title and an obvious close button. Opening it should move focus into an appropriate control, and closing it should return the customer to a useful place. Check Escape behavior and ensure background content cannot be operated while the dialog is modal.

Do not put essential information exclusively behind a control that fails without JavaScript. A size guide can also have a normal page destination or another readable fallback.

Integrate with the theme

Keep IDs unique when a section appears more than once. Handle theme editor reloads and dynamically rendered product content. A quick-view modal, cart drawer and size guide should not compete for focus or leave page scrolling locked after closing.

Test keyboard use, touch devices, long content, browser zoom and closing from every available control. Avoid showing a modal immediately when a page loads unless it serves a clear customer need.

References

Put this into practice.

Minion builds Shopify dialogs and drawers that fit the current theme and support a clear, accessible buying journey.

Talk to MinionExplore our services