{"id":69,"date":"2020-11-05T21:59:39","date_gmt":"2020-11-05T21:59:39","guid":{"rendered":"http:\/\/sites.msudenver.edu\/accessible-design\/?page_id=69"},"modified":"2020-11-17T00:31:33","modified_gmt":"2020-11-17T00:31:33","slug":"tab-ordering","status":"publish","type":"page","link":"https:\/\/sites.msudenver.edu\/accessible-design\/about\/navigation\/tab-ordering\/","title":{"rendered":"Tab Order"},"content":{"rendered":"<h2><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\"><span style=\"font-size: 18pt\">Following Logical Tab Order<\/span><\/span><\/h2>\n<p><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\">The tab order is important for proper navigation through a keyboard interface. The keyboard tab order must be coordinated with the structure of the webpage. In Western cultures, this usually means from left to right, top to bottom. In comparison, a sequential tab order would force users to tab through all controls (could be hundreds) before the one that they want. If the tab order is implemented correctly a webpage will read similar to a book to a keyboard user.<\/span><\/p>\n<h2><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\"><br \/>\n<span style=\"font-size: 18pt\">Best Practices<\/span><\/span><\/h2>\n<p><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\">1. The keyboard navigation order must be logical and intuitive.<\/span><\/p>\n<p><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\">2. The tab order should follow the visual flow of the page: header first, then main navigation, then page navigation (if present), and finally the footer.<\/span><\/p>\n<p><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\">3. Adjusting tab order can be done using the tabindex attribute: <\/span><\/p>\n<p><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\">tabindex= \u201c0\u201d<br \/>\nallows elements besides links and form elements to receive keyboard focus. It does not change the tab order, but places the element in the logical navigation flow, as if it were a link on the page. <\/span><\/p>\n<p><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\">tabindex= \u201c-1\u201d<br \/>\n<\/span><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\">removes the element from the navigation sequence, but can be made focusable using javascript. <\/span><\/p>\n<p><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\">No other tabinex values can be used!<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\">Creating\/changing tab order via code<\/span><\/h3>\n<p><em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">&lt;label&gt;<\/span><\/em><br \/>\n<em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">First in tab index<\/span><\/em><br \/>\n<em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">&lt;input type =\u201dtext\u201d&gt;<\/span><\/em><br \/>\n<em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">&lt;\/label&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">&lt;div tabindex =\u201d0\u201d&gt;<\/span><\/em><br \/>\n<em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">Second in tab order: tabbable because tabindex was added<\/span><\/em><br \/>\n<em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">&lt;\/div&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">&lt;div&gt;<\/span><\/em><br \/>\n<em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">Not focusable because no tabindex is added to the div<\/span><\/em><br \/>\n<em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">&lt;\/div&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">&lt;button&gt;<\/span><\/em><br \/>\n<em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">Third in tab order<\/span><\/em><br \/>\n<em><span style=\"font-family: verdana, geneva, sans-serif;font-size: 14pt\">&lt;\/button&gt;<\/span><\/em><\/p>\n<h3><\/h3>\n<h3><span style=\"font-size: 14pt;font-family: verdana, geneva, sans-serif\">Tab Order<\/span><\/h3>\n<p><span style=\"font-family: verdana, geneva, sans-serif\">The image below shows the correct reading order on a page that has multiple navigation links on the side panels.<\/span><\/p>\n<figure id=\"attachment_119\" aria-describedby=\"caption-attachment-119\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-119\" src=\"http:\/\/sites.msudenver.edu\/accessible-design\/wp-content\/uploads\/sites\/467\/2020\/11\/scheme.png\" alt=\"this image depics a scheme of a webpage with numbered tabs in logical order:  Logo,  Link, Top nav. link, Left nav. link, Main Content,  Right nav. link, Footer.\" width=\"500\" height=\"456\" srcset=\"https:\/\/sites.msudenver.edu\/accessible-design\/wp-content\/uploads\/sites\/467\/2020\/11\/scheme.png 859w, https:\/\/sites.msudenver.edu\/accessible-design\/wp-content\/uploads\/sites\/467\/2020\/11\/scheme-300x273.png 300w, https:\/\/sites.msudenver.edu\/accessible-design\/wp-content\/uploads\/sites\/467\/2020\/11\/scheme-768x700.png 768w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><figcaption id=\"caption-attachment-119\" class=\"wp-caption-text\">Tab order on a webpage<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Following Logical Tab Order The tab order is important for proper navigation through a keyboard interface. The keyboard tab order must be coordinated with the structure of the webpage. In Western cultures, this usually means from left to right, top to bottom. In comparison, a [&hellip;]<\/p>\n","protected":false},"author":860,"featured_media":0,"parent":20,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"class_list":["post-69","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sites.msudenver.edu\/accessible-design\/wp-json\/wp\/v2\/pages\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.msudenver.edu\/accessible-design\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.msudenver.edu\/accessible-design\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.msudenver.edu\/accessible-design\/wp-json\/wp\/v2\/users\/860"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.msudenver.edu\/accessible-design\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":0,"href":"https:\/\/sites.msudenver.edu\/accessible-design\/wp-json\/wp\/v2\/pages\/69\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/sites.msudenver.edu\/accessible-design\/wp-json\/wp\/v2\/pages\/20"}],"wp:attachment":[{"href":"https:\/\/sites.msudenver.edu\/accessible-design\/wp-json\/wp\/v2\/media?parent=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}