The “Skip to toolbar” in the WP Navbar comes tabindex
attribute set to 1; I really think it is correct because it is the first visual element when the navbar is active. The problem is that the HTML of the navbar isn’t really the first in the source code, it is in the footer, so your form fields are first in the source code. When two elements has the same tabindex
attribute, they are navigated in the order they appear in the character stream. So, when you set your fields with tabindex 1 and 2, you go first to your field 1 (it the first in the character stream), then to next tabindex
1 element (WP navbar) and then to tabindex
2 element (your field 2).
This issue shold not happend when the navbar is inactive.
You can start the tabindex
of the form fields in 2 or 3, there is nothing wrong with that. The tabindex
can have any integer value, correlative or not. You can set tabindex
like 1, 2, 3, 4
; 10, 15, 20, 25
or 84, 12, 98
and all of them are correct.