
Opening new windows in HTML can greatly enhance accessibility and usability for users. It's especially useful for users who rely on screen readers or have visual impairments.
For instance, a screen reader can have trouble navigating complex web pages, but opening a new window for a specific task or function can make it easier for them to focus on that task. This is especially true for tasks like filling out forms or accessing sensitive information.
By opening a new window, you can also improve the overall user experience by reducing clutter and distractions on the main page. This is a key principle of usability design, which aims to make websites easy to use and navigate.
According to the HTML specification, opening a new window can be achieved using the target attribute on a link or form. The target attribute specifies where to open the linked document, and setting it to _blank will open the document in a new window.
For another approach, see: Html Link Open Popup Window
What is a Link?
A link is simply a reference to a resource that's connected to a website or another online location. This resource can be a webpage, an email address, or even a file.
Links can be found everywhere on the web, from text on a webpage to images and buttons. They're used to help users navigate to different parts of a website or to external websites altogether.
A link that opens in a new window or tab is one that, when clicked, opens a new tab in your browser or a pop-up window.
Readers also liked: Html Link Open Overlay Window
Link Behavior
If a post or page on your WordPress site has a Link Opens New Window or Tab warning, that means there is a link on your website that has been set to open in a new tab or window when clicked or opened.
To open the link in a new tab, you need to add the target="_blank" property to the anchor tag.
The browser will open the linked document in a new tab or window, depending on the browser's settings when you add the target="_blank" property.
You can find the target="_blank" property in the aria-label, aria-labelledby element, link anchor text, or the alternative text (alt) on a linked image.
Recommended read: What Is Aria in Html
Accessibility and Usability
Accessibility Checker warns about links opening new windows or tabs because it's considered best practice not to open new tabs or windows with links without a warning. This is to ensure users know how to navigate back after clicking the link.
The Accessibility Checker warning is intended to remind you to either change your links to not open new tabs or to ensure a visible and auditory warning is present for any links that do open new tabs.
Links that open new tabs or windows can be beneficial in scenarios where users need to refer back to the original page. For example, when filling out a form or reading a lengthy article, opening a link in the same tab might disrupt the workflow.
Here are some examples of when links should open new tabs and windows:
- Instructions for completing a form that are too long to include on the page with the form; links to the instructions open in a new tab so that people will not lose progress while filling out the form.
- A checkbox asking users to agree to terms and conditions during checkout on an e-commerce store open the Terms & Conditions on a new page so people do not lose their progress completing their purchase.
- A page in a secure web application – like your bank account website – includes a link to an external page that is outside of the secure session. The link opens in a new window or tab since opening the link in the same window will break or end the secure session.
It's essential to inform users that a link will open in a new tab, especially for users who rely on screen readers. This can be done via text or ARIA attributes to ensure that users are not confused.
Accessibility Considerations
Accessibility Considerations are crucial to ensure that users with disabilities can navigate and interact with your website.
To inform users that a link will open in a new tab, use text or ARIA attributes, as this ensures that users relying on screen readers are not confused.
Adding a standard icon after the link, such as a Font Awesome icon, can visually warn sighted users that the link opens in a new tab.
Hidden screen reader text after the link can also be added to warn blind and visually impaired users, who rely on screen readers to navigate.
Here are the specific warnings that Accessibility Checker ignores, as they are considered sufficient for accessibility:
- opens a new window
- opens a new tab
- opens a new document
- opens new window
- opens new tab
- opens new document
To prevent security issues, always include rel="noopener noreferrer" with target="_blank", as this ensures that the new page cannot access the window.opener property.
By taking these accessibility considerations into account, you can create a more inclusive and user-friendly experience for all users, regardless of their abilities.
Examples of Improved Usability

In certain scenarios, usability is improved by links that open new tabs or windows. For example, instructions for completing a form that are too long to include on the page with the form can be linked to a new tab so that people won't lose progress while filling out the form.
A checkbox asking users to agree to terms and conditions during checkout on an e-commerce store can open the Terms & Conditions on a new page so people don't lose their progress completing their purchase. This is a good practice as it allows users to review the terms and conditions without disrupting their checkout process.
Opening links in a new tab can be beneficial in scenarios where users need to refer back to the original page. This is especially true when filling out a form or reading a lengthy article, as opening a link in the same tab might disrupt the workflow.
Expand your knowledge: Progress Bar Html
Here are some examples of when links should open new tabs and windows:
- Instructions for completing a form that are too long to include on the page with the form.
- A checkbox asking users to agree to terms and conditions during checkout on an e-commerce store.
- A page in a secure web application includes a link to an external page that is outside of the secure session.
These scenarios highlight the importance of considering usability when designing links on a website. By opening links in new tabs or windows, users can maintain their workflow and complete tasks more efficiently.
Best Practices and Considerations
Opening links in a new tab can be beneficial, especially when users need to refer back to the original page, such as when filling out a form or reading a lengthy article.
However, overuse can lead to a cluttered browsing experience. To avoid this, it's essential to strike a balance between usability and the need to open links in a new tab.
To ensure a smooth user experience, consider the following best practices:
- Inform users that a link will open in a new tab, especially for users relying on screen readers or assistive technologies.
- Use ARIA attributes to provide an alternative description of the link, so users with disabilities can navigate your site easily.
Ultimately, the key to implementing open new windows effectively is to balance usability with SEO best practices and accessibility considerations.
Expand your knowledge: B Tag in Html
Resolve Link Warning
So you're seeing a link warning when trying to open new windows in HTML. This is usually due to a security feature called the same-origin policy that prevents scripts from making requests to a different origin than the one the web page was loaded from.

The link warning is trying to protect you from malicious scripts that might try to trick you into visiting a different website. This is a good thing, but it can be frustrating if you're trying to open a new window for a legitimate reason.
To resolve the link warning, you can use the target attribute in your HTML link tag. This attribute specifies where to open the linked document. For example, you can use target="_blank" to open the link in a new window.
The target attribute can take on several values, including _blank, _self, and _parent. _blank is the one you want to use when you want to open a new window.
On a similar theme: Html Window Open
Featured Images: pexels.com


