Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

402
Visualizações
is there any way to show a <dialog> as modal without using showModal()?‬

the new <dialog> element improves accessibility by keeping the keyboard focus inside the dialog

Can-I-Use  tabel

Unfortunately it seems like that the improved focus management works only for the JS api.
As you can see the outer input element is prevented from receiving focus because it is in the background:

document.querySelector("dialog").showModal();
<input name="back">

<dialog><input name="front"></dialog>

Without showModal() the outer input element can be focused although it's in the background.

<input name="back">

<dialog open><input name="front"></dialog>

Is there any way to get the same behavior like showModal() only with html?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda