Does the new popover API use dialog element under the hood?
Maybe it's a misunderstanding on my part but I always thought that if you need an element that interrupts the user flow, like any popover does, then it should be created with the
<dialog/> element or else it would not be accessible. Is my stipulation incorrect here?
If I am correct, then does adding popover automatically adds the <dialog/ element as a wrapper? This doesn't seem to be the case from what I can tell after looking at the dev tools.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/popover
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dialog2 Replies
Using the popover attribute does not automatically add a dialog element. What it does do is make that element part of the top layer. The dialog element is also located in the top layer. https://developer.mozilla.org/en-US/docs/Glossary/Top_layer
The dialog element is for things where you want the user focus to be contained in the dialog. Elements using the popover api do not lock the user and they can interact with the rest of the page.
One other cool thing to look forward to is the Invoker Commands API. https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API
I see. thank you 🙂