# Links that open a new tab without saying so

Source: https://easeweb.dev/learn/new-tab-links
Topics: Buttons and links > Links say when they open a new tab or download a file (WCAG 3.2.5)
The fix: Open the link in the same tab, by taking target="_blank" off it. Where a new tab is really needed, say so in the link's words: either as visible text, such as "(opens in a new tab)", or as the name of the icon that marks the link.
Test with: keyboard, screen reader, zoom, mouse
References: https://www.w3.org/WAI/WCAG22/Understanding/change-on-request.html https://www.w3.org/WAI/WCAG22/Techniques/failures/F22 https://www.w3.org/WAI/WCAG22/Techniques/html/H83 https://www.w3.org/WAI/WCAG22/Techniques/general/G200 https://www.w3.org/WAI/WCAG22/Techniques/general/G201 https://design-system.service.gov.uk/styles/links/ https://www.nngroup.com/articles/new-browser-windows-and-tabs/

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.

## What happens

A clothing shop's product page sells a linen shirt in four sizes. Under the price, a sentence says "Not sure which size to choose?" and links to the size guide. The shop wants people to come back and buy, so the link opens the guide in a new tab, with `target="_blank"`. Nothing in its words says so. A screen reader user moves to the link and hears "See the size guide, link". They follow it and the guide is read out, as any new page would be. They measure a shirt they own, find they need a medium, and press Back to choose it. Back does nothing: the guide is the first page in a new tab, so in Chrome, Edge or Firefox on a computer the browser has no page to go back to and greys the button out. The shirt page is still open, one tab to the left, but nothing told them it would be there.

The same link fails in other ways:

- The link has an arrow-in-a-box icon after its words, the usual sign of a new tab, but the icon is `aria-hidden="true"`, so a screen reader still hears only "See the size guide, link", and people who don't know the icon don't read it as a warning.
- A content system adds `target="_blank"` to every link that leaves the site, such as the delivery company's tracking page, so most of the page's links open new tabs and none says so.
- A click handler calls `window.open()` on a button or a link, with the same result and no attribute to see in the markup.

## Why it fails

Success criterion 3.2.5, Change on Request, is level AAA. A change of context, such as a new window or tab, may happen only when the user asks for it, or when there is a way to turn such changes off. Failure F22 covers this link: a link that opens a new window, with no text to say that it will, opens a window the user didn't ask for. Following a link asks for a new page; it doesn't ask for that page to open somewhere else. The browser lets a page do this with one attribute, and says nothing about it, so the person finds out after the change.

H83 is a sufficient technique when a link opens a new window: it keeps `target` and puts the warning in the link text, so everyone knows before they press it. Opening the page in the same tab passes as well, because then nothing changes that the link didn't ask for; G200, an advisory technique, recommends opening new tabs only when they are needed. An icon on its own is not text: when it has no name, as here, a screen reader says nothing about it, and the people who see it still have to know what it means.

## Who is affected

On a phone, a new tab replaces the whole screen, and the page that was open waits out of sight in another tab, which is easy to miss.

## What automation and AI miss

The link has a clear name, so axe and other scanners pass it; none of their rules looks at `target`. EaseWeb's audit lists the links with a `target` other than `_self`, `_parent` or `_top`, or with `window.open()` in an `onclick` attribute, whose name and description say nothing about a new tab or window, as a lead, because 3.2.5 is AAA and only a person can judge whether the new tab is needed and whether the words warn of it. A click handler added by a script, as in the last case above, isn't in the markup, so the audit doesn't see it. A code assistant asked to add an external link can add `target="_blank"` and `rel="noopener noreferrer"` by habit, with an icon and no words, and a request to make it accessible can add `aria-hidden="true"` to that icon, which leaves screen reader users with nothing at all.

## Before: a link that opens a new tab without saying so

```html
<p>
  Not sure which size to choose?
  <a href="/size-guide" target="_blank">See the size guide</a>
</p>
```

`target="_blank"` makes the browser open the guide in a new tab, and 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.

## Before: an icon with no name

```html
<p>
  Not sure which size to choose?
  <a href="/size-guide" target="_blank">
    See the size guide
    <svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true">…</svg>
  </a>
</p>
```

The icon is there for people who see it and know it, but `aria-hidden="true"` takes it out of the link's name, so a screen reader still hears "See the size guide, link". For everyone else, the warning is only as good as their knowledge of the icon.

## After: open the guide in the same tab

```html
<p>
  Not sure which size to choose?
  <a href="/size-guide">See the size guide</a>
</p>
```

Without `target`, the guide opens in the same tab, and Back returns to the shirt, with the page as it was. 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. Nothing changes that the link didn't ask for, so there is nothing to warn about.

## After: say so in the link's words

```html
<p>
  Not sure which size to choose?
  <a href="/size-guide" target="_blank">See the size guide (opens in a new tab)</a>
</p>
```

This is technique H83. The words are on screen and in the link's name, so everyone reads or hears them before they follow the link: "See the size guide (opens in a new tab), link". They come after the visible words the link starts with, so the name still begins with what people see, which is what someone using voice control will say.

## After: give the icon a name

```html
<p>
  Not sure which size to choose?
  <a href="/size-guide" target="_blank">
    See the size guide
    <svg viewBox="0 0 24 24" width="16" height="16" role="img" aria-label="(opens in a new tab)">…</svg>
  </a>
</p>
```

The design keeps its icon, and the icon now has a name, which becomes part of the link's name, so a screen reader hears "See the size guide (opens in a new tab), link". This passes for anyone who hears or reads the link's name. People who see the page only see the icon, so they are warned only if they know what an arrow leaving a box means; many people, including many with cognitive disabilities, don't.

## Which option to use

All three pass 3.2.5. Open the guide in the same tab: it is the only option that keeps Back working in every browser, it needs no words, and people who want a new tab can still open one. Keep a new tab only when the page would lose something without it, such as help opened beside a form that is half filled in, and then put the warning in the link's words, where everyone sees and hears it. Name the icon when the design has one and the words can't be shown; it warns screen reader users but leaves people who don't know the icon guessing.

## Implementation decisions

Where several links open new tabs, a line before them, such as "The links below open in a new tab", saves repeating the words on each, as GOV.UK suggests; add the warning to each link's name too, in hidden text, since a screen reader user who jumps from link to link never hears that line.

Don't put the warning in a `title` attribute. Browsers show it as a tooltip under a mouse, and most show nothing for a keyboard or a touch screen, and screen readers don't read it reliably. A warning in `aria-describedby` alone, as one of G201's examples has it, reaches screen reader users only, and some screen reader settings don't read descriptions; technique H83 puts the warning in the link text, which everyone gets.

Keep the visible words at the start of the name, as above, so the name still begins with the label people see; see [buttons and links named differently from their text](/learn/label-in-name).

Every way of opening a new window needs the same warning: a `target` with any other name, such as `target="help"`, and a script that calls `window.open()`. A form that would lose what people typed if they left it is better fixed by keeping what they typed, so that its help can open in the same tab, than by opening the help in a new one.

## Verify the fix

1. Follow every link on the page, and note each one that opens a new tab or window, whether by `target` or by script.
2. With a screen reader, move to each of those links and confirm the warning is heard as part of its name, before you follow it.
3. Where an icon marks the link, confirm it has a name that says it opens a new tab, or that the words are in the link's text.
4. With a screen magnifier, and on a phone, follow each such link and confirm you can find your way back to the page you were on; for each one, ask whether it needs a new tab at all.

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](/learn/accessible-pdfs). Whether a link's words say where it goes is a separate failure; see [banner and image links with no name](/learn/empty-links). Windows that open with no link pressed at all, such as on page load, fail the same criterion in another way. Test with the screen readers, magnifiers and phones your visitors use.

---

Get this guide in your coding agent: MCP https://easeweb.dev/mcp (setup at https://easeweb.dev/services/developers)
