Interface Core A1 · Official standard

Modal Dialog

A modal dialog is a focused window. It blocks the current screen until someone closes or finishes it.

Try an example
You might call it modaldialogpopup window

Try an example

Preview

Modal Dialog

A modal dialog is a focused window. It blocks the current screen until someone closes or finishes it.

Background content is inert until this dialog closes.
SavedPreview
Modal Dialogmodal-dialog

A real example

For account deletion, keyboard focus stays inside the dialog. If the person cancels, focus returns to the button that opened it.

Main parts

  1. 01Trigger
  2. 02Anchored or modal surface
  3. 03Focus boundary
  4. 04Dismiss path

Use it when

Use it for a short choice or small task that must get full attention.

Do not use it when

Never open one dialog on top of another or use one for normal, low-risk information.

Name used in code

<dialog> / role="dialog" aria-modal="true"

Before you ship

Move focus on purpose. Keep it inside only when the overlay blocks the page. Support Escape and a visible close button, then return focus to the opener. Keep entered data and check small-screen, loading, and failure states.

Request you can copy

Outcome: Use Modal Dialog to solve this user need without losing the current context. User context: For account deletion, keyboard focus stays inside the dialog. If the person cancels, focus returns to the button that opened it. Recommended pattern: Modal Dialog. Why it fits: Use it for a short choice or small task that must get full attention. Do not use it when: Never open one dialog on top of another or use one for normal, low-risk information. Product requirements: Define the default, loading, empty, error, success, and recovery states. Keep user input. Give clear feedback after every action. Accessibility and resilience: Use semantic HTML, full keyboard access, and visible focus. Make the layout work when zoomed and support reduced motion. Follow the project’s current rules. Do not add a new UI library unless the project already uses it. Acceptance criteria: The main task works with keyboard only and at 320px width. Focus and status changes are announced. Check loading, failure, retry, cancel, and reduced-motion paths. Evidence and limits (evidence boundary): The standard covers only the listed scope. It does not choose the visual style, product decision, or Vibulary example. Unknowns to confirm: Product wording, data source, analytics events, supported devices and languages, and platform limits.

Check this request

Review the current use of Modal Dialog. Definition: A modal dialog is a focused window. It blocks the current screen until someone closes or finishes it. Release checks: Move focus on purpose. Keep it inside only when the overlay blocks the page. Support Escape and a visible close button, then return focus to the opener. Keep entered data and check small-screen, loading, and failure states. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.

A1
How official is this term?

Official standard

A named standard sets the rules described on this page.

The standard covers only the listed scope. It does not choose the visual style, product decision, or Vibulary example.

Scope
HTML and ARIA dialog semantics
Document status
living standard
Checked on
2026-07-30

Evidence sources & scope

Authority source + Term reference · WHATWG · living standard HTML Living Standard — The dialog element The dialog element Scope: Web platform; direct scope: The dialog element Role here: Direct term reference Source covers: canonical name, definition, semantics, implementation Authority source · WHATWG · living standard HTML Living Standard Scope: Web platform Role here: Authority within stated scope Source covers: canonical name, definition, semantics, implementation Authority source · W3C · recommendation Accessible Rich Internet Applications (WAI-ARIA) 1.2 Scope: Web accessibility semantics Role here: Authority within stated scope Source covers: canonical name, definition, semantics, implementation Authority source · W3C WAI · stable ARIA Authoring Practices Guide Scope: Accessible web interaction patterns Role here: Authority within stated scope Source covers: canonical name, definition, interaction, keyboard behavior, accessibility

Copy it yourself

The browser could not copy this. Select the request below and copy it yourself.