FYI do. not. use. the dialog tag. It may work but it has a host of other issues. I don't even know if it's an accessibility benefit for anyone but it behaves in weird and uncontrollable ways.
Just make a dialog with a div like you've always have been.