
Analert dialog box is a specialdialog box that is displayed in agraphical user interface when something unexpected occurred that requires immediate user action.
The typical alert dialog provides information in a separatebox to the user, after which the user can only respond in one way: by closing it. Closing an alert dialog will provide access to the original window, which is not available while the alert dialog is presented.
Alert dialogs that block the application are regarded as a bad design solution byusability practitioners, since they are prone to producemode errors. Also when used as error dialogs, they have been shown to be ineffective in their goals to inform users about an error condition or protect from a destructive operation.
Alerts have several typical uses:[1]
Warning andquestion alerts typically offer two opposite options to close the dialog ("Allow/Deny", "OK/Cancel", "Yes/No") with the implicit assumption that one will proceed with the paused process that triggered the dialog, and the other one will interrupt the process without action. A good practice ininterface design, often included inhuman interface guidelines, is to label each option with the precise effect that it will have on the process (for example, "Save/Don't save" in a dialog triggered while editing a document with unsaved changes).
The primary reason for using an alert dialogue instead of communicating via the main program window ismodality. A typical online form is non-modal. They present to a user many actions that can be performed in any sequence. By contrast an alert dialogue creates a modal state that isolates a particular element of the form and requires a user to address it before proceeding to the next step.
The utility of the alert dialogue is increasing with mobile device penetration, because:
alert() is the name of the method used inJavaScript to spawn an alert dialog. The argument to the method is the text to be displayed in the window.
A dialog created this way will contain a yellow triangle warning symbol (similar to those found on electrical devices), the text of the warning message, and a single button saying "OK" which will close the window.
Such a dialog also assumes control over the user interface, preventing the user from proceeding with any other task in the application until the dialog window is closed.[citation needed]
Modal alert dialogs are prone to producemode errors due to their unrequested nature. A study to appear at theProceedings of the Human Factors and Ergonomics Society showed that when a user dialog appears, the primary goal of users is typically to get rid of them as soon as possible[2] even without any analysis of the causes for the dialog appearance. When asked, users dismissed any dialog box as a distraction from their assigned task.
This is explained by a common complaint about the wording of the message in the alert box, which is often incomprehensible to the user. In applications without properuser-centered design, the developers decide the text of the message, including terms and concepts from themental model of the programmer, not of the user's view of the world. Since the dialog doesn't work to accomplish the user needs, the common reaction will be to dismiss the alert without further consideration.[3]
Dangerous actions should be undoable wherever possible; a modal dialog that appears unexpectedly or which is dismissed byhabituation will not protect from the dangerous action.[4] This problem can be avoided by providing anundo action instead of a warning,[5] or showing the warning in aninfobar instead of a dialog.
Another recognized problem is that, as amodal window, the dialog blocks allworkflow in the program until it is closed. Users may not recognize that the dialog requires their attention, leading to confusion about the main window being non-responsive, or causing loss of the user's data input. This often happens in data entry forms after an error alert produced by invalid data. The preferred design include changing a visual aspect of the input element to reflect an invalid entry (such as applying a red border), or adding a character such as anasterisk next to the input element that needs to be corrected.[6]