<dialog> HTML element is notoriously inconsistent, so much so that it is actively discouraged to use it. From version 7 onwards, a11y-dialog no longer supports using the
<dialog> element. If you insist on using it, use the latest version from v6.
Amongst other, here are the issues with the HTML
- Clicking the backdrop does not close the dialog on Chrome.
- The native
::backdroponly shows when programatically opening the dialog, not when using the
- Default styles are left to the browsers’ discretion and can be inconsistent.
- The alert dialog pattern (
role="alertdialog") simply does not work with the dialog element.
- Read more about the shortcoming of the dialog element by Scott O'hara.