Should external links open in a new tab accessibility?
With regards to accessibility, the W3C recommends against opening links in a new tab. “In general, it is better not to open new windows and tabs since they can be disorienting for people, especially people who have difficulty perceiving visual content.”
What do we need to add to the codes below to open the link in a new window?
The short answer is: just add a target=”_blank” attribute to your links (anchor tags). Now when your visitors click that link, it will open in a new window or tab (depending on which web browser they are using and how they configured that browser).
Is it better to open links in the same tab?
In that case, it may be better for your users to open external links in the same tab. There are some security considerations with opening links in a new tab. If you link to a website that has been compromised in some way, chances are that the site could gain control over the browser window of your own page.
What should your HTML code look like when opening a new link?
So, this is what your html link code should look like if you are using target=”_blank” to open a new link: People with vision problems use a screen reader to browse the web. Opening links in a new tab may lead to poor user experience for those visitors.
When do links open in the same window?
In this month’s video Hannah gives a general guide for when your website links should open in a new tab and when they should open in the same window. She gives some examples and shows where you can set this in WordPress. Watch our 5-minute video, or read the transcript below, to find out more.
How do I open a link in a new tab in WordPress?
If you are using WordPress, then you simply add a link via the editor, but check “Open link in a new tab” before you click the “Add Link” button. WordPress automatically adds the required security attributes to the links, so you don’t need to worry about those.