Hi I have this div which is skipped when we press tab, other UI elements come into focus but not this one, Which directive do I need to add to this so that it comes into focus when we navigate UI using keyboard
JavaScript
x
6
1
<div class="vertical-menu">
2
<a ng-class="{active: Page == 'homeview'}" ng-click="Page = 'homeview'">
3
Home
4
</a>
5
</div>
6
Advertisement
Answer
There are html elements without tabindex enabled by default, and the div element is one of these.
To enable it, you must set the tabindex attribute to something >= 0:
JavaScript
1
2
1
<div tabindex="0"> </div>
2
Here you can find more information.