Slots
|
Slot name |
Description |
|---|---|
|
Body |
Default slot. |
|
Header |
Slot which holds the header of the modal, positioned next to the close button. |
|
Footer |
Slot which is typically used to hold call to action buttons, but can also be used to build custom footers. |
|
Tabs |
A boolean to display an inline string of tabs. |
Accessibility
- Modals use ARIA role=”dialog” to convey to screen reader users that they work like native dialog windows.
- After a modal is closed, in order to return focus to the button that launched it, pass the button to the modal as an activator.
Dismissing modals
To cater for both mouse and keyboard interactions we've included numerous ways to dismiss a modal dialog:
- click Cancel in the footer
- click X in the header (if included)
- press Esc on a keyboard
- click anywhere on the blanket