Skip to content
easeweb
Search topics

Links that open a new tab without saying so

A shop's size guide link opens a new tab without saying so, and people who miss the tab find that, in many browsers, Back no longer returns to the shirt.

WCAG 2.2
SC 3.2.5AAA
Required by
Not required by Section 508 or EN 301 549
Broken <a href="/size-guide" target="_blank">
The accessibility problem illustrated: No vision:Where did the shirt page go?
01

The problem

People who can't see a new tab open, or don't notice it, lose the page they were on: in many browsers, Back no longer takes them there

02

Try it

Tab to the size guide link and follow it, then press the browser’s Back to get back to the shirt

  • Broken 1: Tab to the link and follow it. The panel under the window shows what a screen reader says. Did anything warn you that a new tab would open, and does Back take you to the shirt?

  • Broken 2: an icon now sits after the link. Follow it again: does the screen reader warn you that a new tab will open, and does Back take you to the shirt?

  • Apply a fix. Follow the link again: are you told before a new tab opens, and can you get back to the shirt?

Broken Can you fix this?

Linen shirt

$68

Not sure which size to choose? See the size guide

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Open links in the same tab, or say when one opens a new tab

Before

A link that opens a new tab without saying so

<p>  Not sure which size to choose?  <a href="/size-guide" target="_blank">See the size guide</a></p>
What is wrong3 points
  • For anyone who misses the new tab, Back no longer returns to the shirt in many browsers. target="_blank" makes the browser open the guide in a new tab, which has no page to go back to.
  • Nothing warns that a new tab will open. The link's name is "See the size guide", with nothing to say where it will open.
  • The person learns about the new tab only after it has opened, if at all.
After

Open the guide in the same tab

<p>  Not sure which size to choose?  <a href="/size-guide">See the size guide</a></p>
How it is fixed2 steps
  1. Remove target="_blank". The guide opens in the same tab, and Back returns to the shirt, with the page as it was.
  2. Leave the new tab to the person. People who want the guide beside the shirt can still open it in a new tab themselves, with a middle click, Ctrl or Command and a click, the context menu, or a long press on a phone.

This fixes both Befores and passes 3.2.5. Nothing changes that the link didn't ask for, so there is nothing to warn about.

04

Verify the fix

4 checks.

Test with: Keyboard, Screen reader, Zoom, Mouse

0 of 4 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the page's links or the content system that writes them change.

Limits

This is a starting pattern, not a guarantee for every page. It covers links that open new tabs; a link that opens a PDF or downloads a file should also say so, with the file's type and size, and the document itself has to be accessible; see scanned and untagged PDFs that screen readers can't read. Whether a link's words say where it goes is a separate failure; see banner and image links with no name. Windows that open with no link pressed at all fail the same criterion in another way; see pop-up windows that open as soon as a page loads. Test with the screen readers, magnifiers and phones your visitors use.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service