Skip to main content

Modal

Information : Requires JavaScript to work

Modals are used to display important information and can be used to ask users for confirmation on important actions. The modals below don’t use form tags, but they can be used with them.

A modal contains the following important parts :

  • Modal Activator : The button that opens the modal
  • Modal Dialog : The alert window that contains a heading, a clearly defined message and action buttons. Cancel and Confirm buttons are the most common actions.

Note: ravixUI used the semantic HTML <dialog> element with a showModal() which is makes the rest of the page inert(non-interactive) until the modal dialog is closed. To see the support for browsers you can check caniuse dialog .

Simple Modal

This is a simple modal that displays a message on screen, with two action buttons and a close button. Click the button below to open the modal.

Confirm Action

Your current action will affect the following:

  • All of your data
  • Your account
  • Your wallet

Information Modal

This modal type serves as a means to convey critical information to the user. While it can accommodate actions within its confines, it is also capable of functioning without them but requires a close button to dismiss it. The modal dismisses itself when the user interacts with the area outside its boundaries or activates the designated close button.

Note: To ensure best user experience, it is recommended to have a close button in the modal. This will help users to dismiss the modal in all cases.

Accessibility Testing Status

ComponentNVDAWindows NarratorWAVEAxeIBM Equal Access
Simple ModalYesYesYesYesYes
Information ModalYesYesYesYesYes

The modals above make the content behind them inaccessible until the modal is closed and is very disruptive to the user experience, so ensure that the modal is only used when the content is critical and requires user interaction or critical information needs to be conveyed.