Skip to content Skip to navigation


Alert Boxes, Error Messages, and Pop-up Windows

Don't hide warnings, disclaimers, or error messages with JavaScript or other client-side scripting. If a message is important, it is always important to all site visitors. Hidden content in dynamic pages will not be available to web devices that don't support the particular script language. If you cannot imagine showing a warning or disclaimer before it is necessary, then try to develop a server-side solution that will rebuild and serve a modified page with the warning embedded in it.

When possible, sites should also avoid launching secondary browser windows (i.e. Pop up windows, etc.). Unobtrusively forewarning the user is ideal.

A Few Scenarios to Keep in Mind

Someone with low vision

...will often enlarge the screen so that they are only looking at a small portion of the available screen space. When a popup window occurs, it may appear in an area that the screen enlarger is not enlarging, thus confusing the person because the popup is not visible. However, the default behavior of most screen enlargers is to move the visual focus to the area of the screen that receives the programming focus, so it is possible that the screen enlarger will jump to the location of the popup window.

Someone with a cognitive disability

...may or may not know why an error message popped up and may or may not know how to deal with it. Launching a whole new instance of a browser (using target="_blank" for example) will also disrupt the user's session history: the common complaint is that the "Back button" does not work, as the previous browsing history is not present in the new browser window.

Generally, someone using a screen reader

...will likely hear the contents of the popup window being read out loud, however, opening a new window can cause spatial disorientation for blind users.

Many pop-up windows also invoke JavaScript to launch the window. Not all devices will support JavaScript, at which point the content has become inaccessible.


Target Audience: 
Last modified: 
January 12, 2015