{"id":24,"date":"2022-10-28T23:48:04","date_gmt":"2022-10-28T23:48:04","guid":{"rendered":"https:\/\/docs.joedolson.com\/wp-accessibility\/?p=24"},"modified":"2024-09-17T04:38:14","modified_gmt":"2024-09-17T04:38:14","slug":"remove-target-attribute-from-links","status":"publish","type":"post","link":"https:\/\/docs.joedolson.com\/wp-accessibility\/2022\/10\/28\/remove-target-attribute-from-links\/","title":{"rendered":"Remove target attribute from links"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Links opened in new windows can break web site flow (creating a change of context) and disorient users who don\u2019t realize they\u2019ve moved to a new window. Also, it takes away the option of opening in the same window\/tab: all browsers have an option to open links in a new tab, few have an option to open in the same tab. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"457\" src=\"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/10\/image-10-1024x457.png\" alt=\"Accessibility fix settings with Remove tabindex from focusable elements highlighted.\" class=\"wp-image-161\" srcset=\"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/10\/image-10-1024x457.png 1024w, https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/10\/image-10-300x134.png 300w, https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/10\/image-10-768x343.png 768w, https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/10\/image-10-1536x686.png 1536w, https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/10\/image-10-2048x915.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">WP Accessibility will leave the attribute intact if you add the class <code>.wpa-allow-target<\/code> to your link.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/www.w3.org\/TR\/2012\/NOTE-UNDERSTANDING-WCAG20-20120103\/consistent-behavior-no-extreme-changes-context.html\">Further reading about changes of context<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Links opened in new windows can break web site flow (creating a change of context) and disorient users who don\u2019t realize they\u2019ve moved to a new window. Also, it takes away the option of opening in the same window\/tab: all browsers have an option to open links in a new tab, few have an option [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-remediation"],"_links":{"self":[{"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":2,"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/posts\/24\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}