{"id":19,"date":"2022-10-28T23:43:34","date_gmt":"2022-10-28T23:43:34","guid":{"rendered":"https:\/\/docs.joedolson.com\/wp-accessibility\/?p=19"},"modified":"2022-11-17T17:19:29","modified_gmt":"2022-11-17T17:19:29","slug":"skip-links","status":"publish","type":"post","link":"https:\/\/docs.joedolson.com\/wp-accessibility\/2022\/10\/28\/skip-links\/","title":{"rendered":"Skip links"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Skip links are a means to help users of screen readers jump from the beginning of a page to another section of the page. Visual users can scan a page quickly to identify the larger sections and skip over large blocks of text or links, but users of screen readers can\u2019t easily do that. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Skip links provide a means to leap from the very top of a page to an alternate section of that page \u2014 one principle use being to leap over the main navigation to the main page content. <a href=\"http:\/\/www.w3.org\/TR\/UNDERSTANDING-WCAG20\/navigation-mechanisms-skip.html\">Further reading about skip links<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up Skip Links<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WP Accessibility includes settings for two skip links. In most cases, you will only need a Skip to Content link; but in certain rare cases you may need a Skip to Navigation link instead or as well. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The only case where you would need a Skip to Navigation link is if you have a significant quantity of repeated content above your main navigation that&#8217;s duplicated on all pages. If you have just a few items &#8211; a site logo, a search bar, and a couple of links, then the extra skip link is not necessary. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Do you already have a skip link?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you already have a skip link, then you should not turn this feature on. You may have a skip link and not know it &#8211; the majority of sites default to skip links that are hidden by default.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To find your skip link, you place your cursor in the address bar of your site, then use the <code>tab<\/code> key to navigate forward until it becomes visible. You should reach the skip to content link before any other part of your site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can test this in the WordPress admin. After a few tabs, you should see this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"687\" height=\"326\" src=\"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/11\/image-1.png\" alt=\"The focused 'Skip to main content' link in the WordPress admin dashboard. \" class=\"wp-image-89\" srcset=\"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/11\/image-1.png 687w, https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/11\/image-1-300x142.png 300w\" sizes=\"auto, (max-width: 687px) 100vw, 687px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you do the same thing on the public site, you should discover whether you have a skip link.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Finding Link Targets<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Assuming you don&#8217;t have a skip link, you&#8217;ll need to identify what the target of your skip link will be. It needs to be an ID attribute that will be present on every page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the Skip to Content link, the ID attribute should be the first that appears after your main navigation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"529\" height=\"137\" src=\"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/11\/image-2.png\" alt=\"Screenshot showing the possible target IDs in the Twenty Fifteen core theme.\" class=\"wp-image-90\" srcset=\"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/11\/image-2.png 529w, https:\/\/docs.joedolson.com\/wp-accessibility\/wp-content\/uploads\/sites\/11\/2022\/11\/image-2-300x78.png 300w\" sizes=\"auto, (max-width: 529px) 100vw, 529px\" \/><figcaption class=\"wp-element-caption\">This screenshot, from Twenty Fifteen, shows three candidates: #content, #primary, and #main.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It isn&#8217;t critical that it&#8217;s the first ID attribute; what matters is that there shouldn&#8217;t be any other content between the navigation and the target ID. Any of these ID attributes would be effective in this case.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What if my page doesn&#8217;t have ID attributes?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">At the moment, your only option is to edit your theme to add ID attributes. And, honestly, once you&#8217;re editing your theme, you should probably also add your skip link directly to the source code. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After all, the point of WP Accessibility&#8217;s remediation tools is to give you a stop gap until you can fix the accessibility of your site.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Skip links are a means to help users of screen readers jump from the beginning of a page to another section of the page. Visual users can scan a page quickly to identify the larger sections and skip over large blocks of text or links, but users of screen readers can\u2019t easily do that. Skip [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-features"],"_links":{"self":[{"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/posts\/19","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=19"}],"version-history":[{"count":4,"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":20,"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/posts\/19\/revisions\/20"}],"wp:attachment":[{"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.joedolson.com\/wp-accessibility\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}