| |

Why Accessibility Checkers Flag Links That Open in a New Tab (and What to Do About It)

Accessibility checkers can flag every link that opens a new window or tab without telling the visitor. The block editor’s Open in new tab toggle sets target="_blank" in one click, and nothing in core adds the warning that should go with it.

I built WebberZone Link Warnings because I wanted visitors on WebberZone.com and ajaydsouza.comOpens in a new window to have a clear visual signal when a link takes them off-site. It also deals with what these checkers flag.

WebberZone featured image: Why Accessibility Checkers Flag New-Tab Links

What WCAG says about links that open new windows

I’m a plugin developer, not an accessibility consultant. This section rests on W3C and checker documentation, not on my own audit work.

The relevant success criterion is 3.2.5 Change on RequestOpens in a new window (Level AAA). It requires that changes of context happen only at the user’s request, or that a mechanism is available to turn them off. The W3C lists opening a new window as an example of a change of context.

The advisory technique G200Opens in a new window recommends opening new windows only when necessary, such as a help link on a half-completed form.

G201Opens in a new window, also advisory, recommends a warning before a link opens a new window. Its test has two parts: assistive technology must announce it, and a visual indication must be present.

G201 says it isn’t needed to meet any particular success criterion. The documented failure is F22Opens in a new window: under 3.2.5, an element that opens a new window fails when no text says it will.

What accessibility checkers look for

In Equalize Digital’s Accessibility Checker, the Link Opens New Window or Tab check raises a warning on each target="_blank" link, citing 3.2.2 and 3.2.5 (Levels A and AAA).

A link avoids the flag only with a recognized phrase, like “opens a new window” or “opens new tab”, in its anchor text, aria-label, aria-labelledby reference or linked image alt text. The recommended fixes match G201: drop target="_blank" where a new tab isn’t needed; otherwise, add both a visible and a screen reader warning.

PowerMapper’s SortSiteOpens in a new window has a matching rule. It also checks target="_new" and cites F22.

Accessibility Checker in the block editor sidebar, listing one Link Opens New Window or Tab warning for a test post with two links that open in a new tab.

Why this matters beyond compliance

According to G201, unexpected new windows can disorient people who have difficulty perceiving visual content and some people with cognitive disabilities.

The Back button also stops working in a new tab. A warning lets people decide before they click.

How Link Warnings handles it

Link Warnings adds the warning at render time. It parses each link with WordPress’s WP_HTML_Tag_Processor and writes the markup into the output.

Choose the approach under Settings → Link Warnings with Warning Method. The default is Inline indicators + Modal dialog, which is how I have it on my own sites.

The General tab under Settings → Link Warnings, showing Warning Method set to Inline indicators + Modal dialog and Inline Indicator Scope set to External links only.

Inline indicators

Each processed link that opens a new tab gets hidden screen reader text plus an icon marked aria-hidden="true", the two things G201’s test checks for. External links that open in the same tab get the icon without the new-window text.

Screen Reader Text defaults to “Opens in a new window”. Visual Indicator defaults to the icon and includes None (screen reader only). Links with no visible text, such as social icons, get only the screen reader text.

A paragraph on the front end where an external link that opens in a new tab ends with the ↗ icon.
The Visual Indicator setting on the Display tab, set to Icon (↗), with Text, Icon + text and None (screen reader only) as the other options.
The Screen Reader Text setting on the Display tab, set to its default, Opens in a new window.

Inline Indicator Scope defaults to External links only. If internal links open new tabs too, choose External links and internal links opening in a new tab.

Modal dialog

The modal asks for confirmation and moves keyboard focus into itself, keeps Tab inside the dialog, closes on Escape and returns focus to the link. For new-tab links, the Continue button’s accessible label repeats the screen reader text.

The confirmation modal titled You are leaving this site, with the message You are about to visit an external website. Continue?, the destination URL, and Cancel and Continue buttons.

Redirect screen

The redirect screen shows the destination domain and full URL. Redirect Countdown defaults to 5 seconds; set it to 0 to require a click on Continue to site.

The redirect screen titled Leaving this site, showing the destination domain and full URL, Continue to site and Go back buttons, and the automatic redirect countdown.

Where the warnings are added

Post content and excerpts are handled on single views of the Enabled Post Types, posts and pages by default. Since version 1.6, widgets, navigation menus, comments and block-theme template parts are covered too, each with a checkbox under General → External Content, all on by default.

A browser scan catches links the server never saw. The plugin never writes to stored content, so deactivating it leaves your links exactly as they were.

Disable Warnings For, added in version 1.7, hides warnings from logged-in users or selected roles, but links that open a new tab still carry the screen reader text.

Getting started

Install WebberZone Link Warnings free from WordPress.org. After activation, an admin notice offers a setup wizard. For a full walkthrough, see How to Warn Users Before Opening External Links in WordPress.

Then rerun your checker. Accessibility Checker 1.52.0 accepts the default “Opens in a new window”, so if you change Screen Reader Text, keep wording your checker recognizes.

Leave a Reply

Your email address will not be published. Required fields are marked *