Tabindex attribute allows an element to be keyboard focusable when tabbing or via JavaScript .focus(). Only tabindex=-1 or 0 should be used, and only if native HTML controls can't be used.
Guidance
Never use positive tabindex values, e.g. don't use tabindex=1, 2, 3, 4, etc..
Rather than using <div tabindex="0">, use a native <button> or <a href> element which is already focusable.
Use HTML5 autofocus attribute rather than tabindex if you need to start the user's focus in a different area than the top of the page.