Tuesday 02 July 2002

Accessibility tip 11: Don’t open new windows

Since Web users understand the Back button, writes Mark Pilgrim, don’t break it by using the <a target="_blank"> tag to force a link to open in a new window. That’s fine by me, though I didn’t realize that the target attribute of the <a> tag is deprecated in HTML 4.01 Strict and XHTML 1.0 Strict.

If you provide a “Links open new windows” checkbox, Mark recommends that you set it to be off by default. And don’t forget that (in Windows) right-clicking on a link offers the contextual menu choice: “Open in new window.” <edited>Or better still—as Mark Pilgrim suggests in the comments—Shift-clicking on the link offers an OS-independent way of opening a link in a new window.</edited>

Opening links in a new window is usually driven by a fear that, if the visitor follows a link to another site, They Might Not Return! Jakob Nielsen points out the self-defeating nature of this practice:

…it disables the Back button which is the normal way users return to previous sites. Users often don’t notice that a new window has opened, especially if they are using a small monitor where the windows are maximized to fill up the screen. So a user who tries to return to the origin will be confused by a grayed out Back button.

The only reliable way to ensure that visitors will return to your site is to offer them an engaging, regularly-updated experience.

Permalink | Technorati

Comments

I suppose this means that I have to go back and remove the target=_blank from the links in my last post. I use the target=_blank in my links to other blogs on the sidebar because I use them to make my daily visits and prefer clicking the x to clicking the back arrow. Oh the dilemna's you pose what is a guy to do.

Posted by Norman Jenson on 2 July 2002 (Comment Permalink)

1. Use the SHIFT key when selecting links for yourself. (Cool browsers like Opera support CTRL+SHIFT to open windows in the background.)

2. Add a "links open new windows" checkbox to your templates that remembers settings with a cookie, so links can open in new windows /for you/ but the default is still off.

3. Use the ultra-cool "links open new windows" bookmarklet. Note that this works on any page, not just your own. Bitchin'.

4. Use a news aggregator. I hear good things about Amphetadesk, and it's free.

Posted by Mark Pilgrim on 2 July 2002 (Comment Permalink)

Bugger all. Jonathon, fix your MT comment template so it escapes comments properly. Meanwhile, here are the links that disappeared:

"links open new windows" bookmarklet: http://www.randomwalks.com/links.html

Amphetadesk: http://www.disobey.com/amphetadesk/

Posted by Mark Pilgrim on 2 July 2002 (Comment Permalink)

"...engaging, regularly-updated experience".

Well, okay. I guess I'll keep coming back.

Posted by Burningbird on 2 July 2002 (Comment Permalink)

I use my blog roll for my daily blog visits as well, and I have an ideal solution to the problem of wanting to easily open blogs in new windows. Mozilla's gesture recognition package ( http://optimoz.mozdev.org/ ) has a very handy gesture which allows you to drag your mouse over a whole load of links on a page and then finish with right-up-left to have ALL of them open up in new tabs. This lets me start all of my daily blogs loading at the same time with a flourish of the mouse.

Posted by Simon Willison on 2 July 2002 (Comment Permalink)

Simon, this looks extremely cool (and something I can see myself using). It looks kind of like the Graffiti writing you use with a Palm Pilot. Is it stable though?

Posted by Jonathon Delacour on 2 July 2002 (Comment Permalink)

I dont think anything should be taken as an absolute. There are times when opening a new window may be perfectly appropriate, especially if the new window has a defined size and is fairly small. This is a great delivery mechanism for really short bits of information, or pictures, that are subsets of your own site and don't really warrant a full page. For example, suppose I have a personal webpage, and I include the obligatory "about" or "bio" link (I hate those). If I'm only going to write one paragraph, there's no point sending someone to a whole new page to read it (and such a small amount of info may look silly on a whole page) when they can quickly read it in a small (1/4 screen or less) popup and then close it.

I would agree, however, that setting all your links to external sites to open new windows, just for the purpose of keeping your own window open, is a bad idea.

Posted by david on 4 July 2002 (Comment Permalink)

I actually prefer sites that pop up new windows: I use the shift-click function to pop them up myself because it's MUCH faster to return to the original window by closing the new one. The browser Back button never seems to read the files from the cache so the whole page must be reloaded from the Website, so I have to wait for all that again.

Posted by Joe on 9 February 2003 (Comment Permalink)

This discussion is now closed. My thanks to everyone who contributed.

© Copyright 2007 Jonathon Delacour