Tabindex stops at a specific element

I am using Angular JS in my application. I am using tabindex for some interactive elements to support keyboard users for an application.

My understanding of tabindex is that suppose element A gets tabindex = 1, element B gets tabindex = 3, element C with tabindex = 2, then the tab order would be A → C → B. Then the loop continues.

I have provided the following piece of code. This part is actually modal, which appears on top of another page:

<div data-ng-if="true">
    <a tabindex="1" data-ng-click="function1()">Change Password</a>
</div>
<div>
    <a tabindex="2" data-ng-click="function2()">Manage</a>
</div>

      

So when we start tabbing, we expect the password change with tabindex 1 to be highlighted and then Controlled with tabindex 2. Then the loop continues. However, the tab stops when running

Has anyone faced a similar problem?

+3


source to share


2 answers


I think tabindex works in reverse, i.e. if A = 1, B = 2 and C = 3, then the order is C> B> A.



0


source


  • If tabindex is a negative value, you cannot focus it using tab

    click.
  • If it is zero, this is the first element that is focused in the document.
  • If this is a positive number, items will be focused in ascending order
  • If the elements contain the same tabindex, the order in the html matters. oriented in the order in which they are created in html

for more information, read tabindex



Most importantly, the browser url field with tabindex 0

0


source







All Articles