Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

406
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!