The AlertDialog component should use the HTML5 dialogelement. It's purpose is mainly when you would do a destructive action. Such as deleting a user.
Features:
Create a backdrop on the entire page
Clicking outside the dialog won't close the dialog
Dialog should be able to have buttons. Where as one should be able to close the dialog
If a user presses ´ESC`, the window should close too
If a user presses TAB, the tabbing should only occur inside the dialog component
ariaHasPopup
Example of structure
<AlertDialog.Root>
<AlertDialog.Title>
Hello World
</AlertDialog.Title>
<AlertDialog.Content>
This will be the content of the dialog
</AlertDialog.Content>
<AlertDialog.Cancel>
<button>Close</button>
</AlertDialog.Cancel>
<AlertDialog.Action>
<button>Add</button>
</AlertDialog.Action>
</AlertDialog.Root>
The AlertDialog component should use the HTML5
dialog
element. It's purpose is mainly when you would do a destructive action. Such as deleting a user.Features:
TAB
, the tabbing should only occur inside the dialog componentExample of structure