accessibility glossary

Modal Dialog Pattern

The WAI-ARIA design pattern for pop-up dialogs that trap keyboard focus inside the dialog, label it correctly, and return focus to its trigger when closed.

The modal dialog pattern defines how pop-ups, confirmation prompts, image lightboxes, and cookie banners, should behave for keyboard and screen reader users: focus moves into the dialog when it opens, Tab cycles only among the elements inside it (a focus trap), Escape closes it, and focus returns to whatever element opened it once it is dismissed.

Modals that skip the focus trap let a keyboard user tab silently behind the dialog into the page underneath, while modals that never return focus on close leave a keyboard user disoriented, having to navigate the whole page again to find where they were.

Need help with Accessibility Remediation Services? See how halfAccessible can help.

Accessibility Remediation Services