Lightbox
Lightbox
Um lightbox abre a mídia num visualizador maior e escurece a página ao redor.
<dialog>Um exemplo real
Selecione uma foto para abrir uma visualização em tamanho real com legenda. Possui botões Anterior, Próximo e Fechar.
Partes principais
- 01Acionar
- 02Anchored or modal surface
- 03Focus boundary
- 04Dismiss path
Use-o quando
Use-o para olhar de perto a mídia sem perder o lugar atual na galeria.
Não o use quando
Nunca o use para uma tarefa que necessite de edição complexa ou comparação lado a lado.
Nome usado no código
<dialog> Antes de lançar
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.
Outcome: Complete the task with Lightbox (Lightbox). User context: Selecione uma foto para abrir uma visualização em tamanho real com legenda. Possui botões Anterior, Próximo e Fechar. Recommended pattern: Lightbox (Lightbox). Why it fits: Use-o para olhar de perto a mídia sem perder o lugar atual na galeria. Do not use it when: Nunca o use para uma tarefa que necessite de edição complexa ou comparação lado a lado. 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): Nenhum padrão oficial único controla todo o termo. Seu significado pode mudar entre equipes, plataformas ou frameworks. Unknowns to confirm: Product wording, data source, analytics events, supported devices and languages, and platform limits.
Conferir este pedido
Review how Lightbox (Lightbox) is used now. Definition: Um lightbox abre a mídia num visualizador maior e escurece a página ao redor. 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, list the evidence, gaps, severity, and the smallest safe fix.