Alert dialog box
   HOME

TheInfoList



OR:

An alert dialog box is a special
dialog box The dialog box (also called dialogue box (non-U.S. English), message box or simply dialog) is a graphical control element in the form of a small window that communicates information to the user and prompts them for a response. Dialog boxes ar ...
that is displayed in a
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inst ...
when something unexpected occurred that requires immediate user action. The typical alert dialog provides information in a separate box 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 by usability practitioners, since they are prone to produce
mode error In user interface design, a mode is a distinct setting within a computer program or any physical machine interface, in which the same user input will produce perceived results different from those that it would in other settings. Modal interface ...
s. 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.


Usage

Alerts have several typical uses: * Error: informs the user than an operation could not continue or complete due to some insurmountable error. * Warning: alerts that the current course of action could be in some way dangerous or detrimental, often offering the option of not proceeding. * Info: presents a general notification about a recent event. * Question: elicits some kind of response from the user, required to complete the current process. ''Warning'' and ''question'' 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 in interface design, often included in human 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 is modality. 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: * modal alerts are part of the native functionality of a mobile device, so can be deployed consistently across the device ecosystem as opposed to visual styling techniques that are prone to cross-platform inconsistency * smaller viewports (screens) make it more difficult to review the main program window looking for errors/information * smaller viewports have acclimatized users to interacting with a sequence of small screens each with a define action, rather than viewing all contextual info at once on a big screen


Example

alert() is the name of the method used in
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, of ...
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.


Criticism

Modal alert dialogs are prone to produce
mode error In user interface design, a mode is a distinct setting within a computer program or any physical machine interface, in which the same user input will produce perceived results different from those that it would in other settings. Modal interface ...
s due to their unrequested nature. A study to appear at the ''Proceedings 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 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 proper
user-centered design User-centered design (UCD) or user-driven development (UDD) is a framework of process (not restricted to interfaces or technologies) in which usability goals, user characteristics, environment, tasks and workflow of a product, service or proc ...
, the developers decide the text of the message, including terms and concepts from the
mental model A mental model is an explanation of someone's thought process about how something works in the real world. It is a representation of the surrounding world, the relationships between its various parts and a person's intuitive perception about thei ...
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. Dangerous actions should be undoable wherever possible; a modal dialog that appears unexpectedly or which is dismissed by
habituation Habituation is a form of non-associative learning in which an innate (non-reinforced) response to a stimulus decreases after repeated or prolonged presentations of that stimulus. Responses that habituate include those that involve the intact org ...
will not protect from the dangerous action. This problem can be avoided by providing an undo action instead of a warning, or showing the warning in an
infobar An infobar is a graphical control element used by browsers including Firefox and Google Chrome and other software programs to display non-critical information to a user. It usually appears as a temporary extension of an existing toolbar The too ...
instead of a dialog. Another recognized problem is that, as a
modal window In user interface design for computer applications, a modal window is a graphical control element subordinate to an application's main window. A modal window creates a mode that disables the main window but keeps it visible, with the modal window a ...
, the dialog blocks all
workflow A workflow consists of an orchestrated and repeatable pattern of activity, enabled by the systematic organization of resources into processes that transform materials, provide services, or process information. It can be depicted as a sequence o ...
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 an asterisk next to the input element that needs to be corrected.


References


External links


Designing Around Dialogs
a presentation about the usage problems of alert dialogs. {{Graphical control elements Graphical control elements