Web Access Centre
New windows - Web Access Centre
Summary: New windows can only be used if the user is warned it will open before they click on the link.
- Rationale
- Techniques
- Testing tips
- Further information
- Website Accessibility Initiative compliance
- Other pages about navigation

Rationale
Before users follow a link they should know if it is going to open a new window. People can become lost or confused when they don’t realise a new window has opened especially those who use access technology. It may not be obvious that this has happened, and that keyboard commands, such as BACKSPACE to return to the previous page, will not work.
A link should also warn users if it will launch a file related to a particular piece of software, for example, where the destination is an Acrobat PDF, MS Word or audio file.
Techniques
- Best avoided, only launch a new browser window from a link if it is really necessary. For instance, if the link destination will take users out of a secure website, then it may perfectly valid to open a new window so that users won't be put to the trouble of logging in again.
- Don't use JavaScript alone to open new browser windows. If you need to do so, however, provide an HTML alternative. See "Further information" for a link to accessible JavaScript techniques.
- Warn users about any links that would open new windows by:
a) Multiple links - placing a message before the first link is reached, saying which group of links are affected, for instance, “All links on this page will open in a new window”.
b) Single links - by adding the words “New window” to the link text.
- An alternative, when a new window is opened, internal to your site, might be to put the words “New window” into the start of the <TITLE> tag of the target page.
- Different file formats should also be notified to users, as they may launch a new application. Within the link text, users should be informed of the change to PDF files, MS Word documents, or audio files, for example. As many of these can be quite large, it would also be helpful to give the size of the target file.
Example of a new window warning text link:
<a href="doc1.htm" target="_blank">Destination page - new window.</a>
Examples of new file format INFORMATION:
<a href=”report1.pdf”>Report name: (PDF format) 124k </a><br>
<a href=”report1.txt”> Report name: (Text only format) 15k</a><br>
<a href=”report1.doc”> Report name: (Microsoft Word 2000 format) 520k </a><br>
<a href=”report1.zip”> Report name: (Microsoft Word 2000 format, zipped) 380k</a>
Testing tips
Identifying pages containing links that open new windows or that launch new applications may be best performed by automatic testing tools. However, once the links have been located, you should use your own judgement to decide which of the techniques listed above to apply.
- Automated tools - Add in a hyphen here as the text is the same and acts as a fixed heading. Under automated tools flag up what the tool can check for that the manual check that must accompany it if any. This may also appear under "Browser".
- Accessibility toolbar - Check for links that will open a new browser window, or that lead to a different file type:
a) Select Structure, then choose JavaScript/New Window links this will let you know how many links may be affected, and whether they are opened with JavaScript, or if a TARGET attribute has been found in the HTML code.
b) Select Info, then choose the List Downloadable Files option. From the list, provided ensure that format and size are given as part of the relevant link
- Browser – View the source code of the page in your browser, and search the code for keywords to locate links that may need to be given additional information. Terms such as "_blank", "window". Using a ".pdf", ".doc", ".txt", ".wav" etc. suffix can be used to search for file types. Alternatively, manually check each link by following it to ensure that no new window or application is launched without warning, and that the file type doesn't change from HTML without the format and size information being given in the link text.
- Screen reader – A quick way to find all page links, is using JAWS "List link" function launched -by pressing the F6 key on your keyboard.
- Text browser - Flag up where text browsers are useful i.e. checking functionality works in the absence of JavaScript, frames and so on.
Further information
- Opening new browser windows with JavaScript techniques can be found in the JavaScript section.
Website Accessibility Initiative compliance
- 13.1 Clearly identify the target of each link. Priority 2
- 13.4 Use navigation mechanisms in a consistent manner. Priority 2
For more information on techniques visit the Web Accessibility Initiative techniques page.
Other pages about navigation
- Links
- Help pages
- Hidden navigation and tab index
- Access keys
- Navigation
- New windows
- Page titles
- Sitemaps
Back to Design & Build
For Web Access Centre updates email webaccess@rnib.org.uk
Content author: webaccess@rnib.org.uk
Last updated: 08/04/2008 18:38
More info
Latest updates
Related info
Your stories
JK Rowling's story - when JK Rowling had her website redesigned she asked design agency Lightmaker to push the boundaries of accessible Flash. The original site offered the user an intensely visual experience. The new site needed to keep the explorative and creative elements but present them in a universally accessible way. Find out about the key features of the site and how it was designed. JK Rowling's accessible Flash website - full story