Interface More detail C · Industry convention

Lightbox

A lightbox opens media in a larger viewer and darkens the page around it.

Try an example
You might call it image viewergallery overlay

Try an example

Lightbox<dialog>
Dawn light across an original abstract ridge study02 / 05
Lightbox

Ridge study · Photograph 2 of 5

A real example

Select a photo to open a full-size view with a caption. It has Previous, Next, and Close buttons.

Main parts

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

Use it when

Use it to look closely at media without losing the current place in the gallery.

Do not use it when

Never use it for a task that needs complex editing or side-by-side comparison.

Name used in code

<dialog>

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 Lightbox to solve this user need without losing the current context. User context: Select a photo to open a full-size view with a caption. It has Previous, Next, and Close buttons. Recommended pattern: Lightbox. Why it fits: Use it to look closely at media without losing the current place in the gallery. Do not use it when: Never use it for a task that needs complex editing or side-by-side comparison. 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): No single official standard controls the whole term. Its meaning may change across teams, platforms, or frameworks. Unknowns to confirm: Product wording, data source, analytics events, supported devices and languages, and platform limits.

Check this request

Review the current use of Lightbox. Definition: A lightbox opens media in a larger viewer and darkens the page around 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.

C
How official is this term?

Industry convention

People often use this term at work. The listed sources may support practice or limitations. They do not define every part of the term.

No single official standard controls the whole term. Its meaning may change across teams, platforms, or frameworks.

Scope
Web overlay convention
Document status
stable
Checked on
2026-07-30

Evidence sources & scope

Authority source · W3C WAI · stable ARIA Authoring Practices Guide Scope: Accessible web interaction patterns Role here: Helpful background, not a definition Source covers: canonical name, definition, interaction, keyboard behavior, accessibility Authority source · W3C · recommendation Web Content Accessibility Guidelines (WCAG) 2.2 Scope: Web accessibility conformance Role here: Helpful background, not a definition Source covers: accessibility, usage guidance, avoidance guidance

Copy it yourself

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