User:Aron Manning/Design/Skin accessibility: tab navigation

Initially posted at: T240489 "Determine the optimum Vector DOM structure for a11y and performance"

Below is a proposed navigation order. Preferably the DOM order follows the navigation order closely, every out-of-order navigation step requires specific javascript code to implement.

The common practice on popular webpages is that the first TAB (or the initial focus) navigates to the search bar. This is the place where users would type in text, thus need the focus.

I think the best practice would be to focus the search bar upon page load. Currently, search is part of the header which is at the end of the DOM (in Vector, not Timeless or Minerva).

To reach the search field it takes:


 * 2 TABs + ENTER + TAB in Vector (not the proper input element is selected by the jump link)
 * 4 TABs in Timeless (alerts, notifications, logo, search)
 * 3 TABs in Minerva, but when focused typing is ineffective, the characters aren't appearing in the field. The field has to be tapped to be activated. This is not an issue on mobile.

I find the order from the most commonly needed to the least common is something along these lines (this is somewhat subjective):


 * 1) Search (focused when loaded)
 * 2) Language (imo this should be always next to search)
 * 3) skip links:
 * 4) jump to TOC
 * 5) * alternative: just one link to Article, where the following 2 skip links show up:
 * 6) jump to Infobox
 * 7) jump to Content
 * 8) jump to User tools (top right)
 * 9) User menu:  . In the foreseeable future: drop-down only opens if ENTER/SPACE is pressed.
 * 10) Alerts: , Notifications:  , (Watchlist), (Discourse notifications)
 * 11) At the end jumps back to skip links.
 * 12) jump to Site navigation on left:
 * 13) skip the logo (highlighting a focused image is problematic), there's a "Main Page" link instead
 * 14)   and siblings.
 * 15) Jumps back to skip links.
 * 16) Page links
 * 17) * "Discuss", "Read", "Edit", ("Edit source"), "History", "Translate" (skip which one is active)
 * 18) * Maybe skip links should jump here too, but I don't think its worth the extra skip link.
 * 19) * Continues to TOC or Content.
 * 20) Parent page links
 * 21) * skip the tagline (“The free Encyclopedia”), there's no point in navigating to "Wikipedia", the user is already there and the main page can be reached from Site navigation
 * 22) Article
 * 23) alternative: skip links here for Infobox, Content
 * 24) TOC
 * 25) Infobox
 * 26) Content
 * 27) article Lead
 * 28) article Sections
 * 29) Footer
 * 30) Circles back to Search.

I'm ambivalent about the order and structure of the skip links: this is particularly subjective with no golden path.