Tabindex Practices
I usually suggest not installing Tabindex with any additional values, because for any fields / components on your web page, if we follow this rule, we need to maintain the same incremental tabindex values ββfor upcoming fields, and we basically show / hide fields / components based on certain conditions so that the time of the tab indices does not work sequentially.
I highly recommend that it is best to use Tabindex greater than 0 and use only Tabindex -1 and 0 wherever required
TabIndex = "- 1"
Setting tabindex = "- 1" allows you to set the focus of elements using a script, but not put it in the order of the page tabs. This is convenient when you need to move the focus to what you updated using a script or outside the user's actions.
TabIndex = "0"
Setting tabindex = "0" will lead to the element and make it focusable. It does not set the position of the elements in tab order, it simply allows the user to focus the element in the order determined by its location using the DOM.
tabindex = "1" (or any value> 0)
Do not set tabindex = "1" or any value greater than zero (or any positive value).
source share