pharos icon indicating copy to clipboard operation
pharos copied to clipboard

Leverage native dialog element for Modal

Open daneah opened this issue 3 years ago • 1 comments

The problem

Modals present a number of accessibility challenges to get right, including:

  • Focus trapping in the dialog itself
  • Making the background content inert
  • Announcing the dialog to screen readers

The solution

The native dialog element handles many of these challenges natively, reducing the code we need to manage ourselves. As the dialog and standards around it evolve, we won't need to react as often/deeply.

Additional information

This has wide support, but Safari only supports it as of 15.4—we'll need to wait just a bit until we no longer need to support older Safari versions.

daneah avatar May 18 '22 12:05 daneah

Browser support has been fairly full for ~2 years now, so I suspect we are in a place to investigate making this move.

daneah avatar Aug 30 '24 01:08 daneah