Could this make use of the dialog element for greater accessibility?
@gavmck It would be nice, but it seems to be implemented in a few browsers...
There is an attribute role=dialog, maybe it can be useful for now.
Sources:
MDN - Dialog
caniuse.com/dialog
Yes, you should be putting role="dialog" on the modal element. That will assist screen readers by letting them understand the semantic role of the element in the app.
Nice!