Links opening in new windows are an accessibility barrier we find on most websites we audit. These barriers are problematic for many people. The good news is that there’s an easy fix!
Some people recommend opening in-domain links in the same window, and opening a new window for off-domain links. This is an old practice. It goes back to the olden days when browsers didn’t allow users to easily open links in new tabs/windows. And marketing folks thought it was good to keep a visitor on the page they started from. These people rarely considered accessibility, of course!
Who is it a problem for?
This impacts primarily non-sighted screen reader users. It also impacts folks with cognitive impairments. It may also have an impact on people who aren’t familiar with web use. Yes, there are still people who don’t use the web much at all. Remind me to tell you about my 30-something hairdresser who doesn’t own a computer or a cell phone. It might also have an impact on people who are distracted by their environment. For example a young parent paying more attention to their funny toddler than to their computer screen.
Why is it a problem?
Opening links in new windows (or tabs) changes the context. Opening a link in a new window can be disorienting for someone who isn’t able to perceive the change. They may not understand that they can’t use the “back” button on their browser to return to previous content.
Solutions
Let people decide
Let your visitors make their own decisions. It’s easy for them to open a link in a new window or tab, if they want to. Don’t force that decision on them.
Foreground image with alt text
There are situations where you can’t avoid the opening of links in new windows. This may be due to internal policies, or strong design brief, or for any other reason. In these cases, your solution should clearly notify all visitors that the link opens in a new window. This includes:
- Non-sighted individuals
- Sighted individuals
You could achieve this in many ways. Our experience shows that the simplest, most robust way is to use a foreground image with clear alt text.
<a href="https://knowbility.org/blog/2018/keyboard-testing-basics/" target="_blank">The importance of keyboard testing <img src="new-window.png" alt="Opens in a new window"></a>
Which looks like this:
The importance of keyboard testing
This solution means:
- Sighted individuals will have a visible signal that the link opens in a new window.
- Non-sighted screen reader users will have a text-signal that the link opens in a new window.
- Sighted individuals still get to know about the new window If the image fails to load. Browsers generally display the alt text when images fail to load.
- The image should load in High Contrast mode.
Takeaways
Forcing links to open in new windows without warning causes problems for many people. It’s best to allow the visitor to decide whether to open the link in the same window or not. However, it’s easy to notify visitors that a link opens in a new window. As Nike’s motto says: “Just do it.”
If you have questions, comments, or want to add your perspective, please let us know via email or on Twitter @knowbility. And, if you need help with all the other tasks related to accessible design, development, and leadership support, we’re here for you.
Photo credit By Mounirzok CC BY-SA 4.0, from Wikimedia Commons.