If you want to open a link in a new browser window/tab, the common approach is to use the target=”_blank” attribute in your anchor tag. However, the target attribute is deprecated by W3C standards and your HTML won’t validate if you use it.
The common alternative is to use JavaScript but I don’t really like that — what happens if the user doesn’t have JavaScript enabled? Also, apparently JavaScript versions are more susceptible to pop up blockers (although I can’t confirm if this is really the case).
Smashing Magazine argue that links shouldn’t open in new windows, because it leads to bad user expectation as users expect links to open in the same window. They do say there are certain exceptions. I don’t entirely agree with this. I may not expect a window to open in a new window, but I don’t know if that necessarily leads to a bad user experience, you just go, oh it opened in a new window, right lets go there now…
One way to make the target attribute validate is to the XHTML transitional DocType:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Again though this isn’t ideal because of the other subtleties of using a transitional DocType instead of a strict one. So, that’s why I ask, what is the go with the target attribute? Is there an alternate, HTML only solution? Is everyone comfortable using the unobtrusive javascript way? Do I just need to harden up and do that?
BTW, I do realise its ironic that this post links to external sources using the deprecated target=”_blank” attribute. But that’s just the easiest way to do it in Wordpress.
I would agree that in many cases a link opening in a new window leads to a bad user experience. Obviously it depends on factors such as the familiarity with the site, expectations, and the individual user. But I would expect that for the majority of web users it’s either confusing or annoying.
Our payroll app lists payslips but then opens them in a separate window or tab. This isn’t given focus and it gets me every time. I sit there clicking on the link going “why isn’t it opening?” despite the fact that I know. Even if I remember straight away it takes me just that bit longer to realise and it’s an extra step for me to click to the new window/tab. Web users want the web to be fast and this sort of activity can slow them down.
I would say that as far as you possibly can you should open links in the same window. Only open them in a new window if you have a really good reason to do so. I can’t think of one right now though.
Comment by Lindsey — May 12, 2010 #
Just on usability, is it possible in Wordpress to move your Submit Comment button below your captcha code?
Comment by Lindsey — May 12, 2010 #