0

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

<div class="vertical-menu">       
  <a ng-class="{active: Page == 'homeview'}" ng-click="Page = 'homeview'">
    Home
  </a>    
</div>
Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129
CleanCoder540
  • 57
  • 1
  • 8

1 Answers1

1

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:

<div tabindex="0"> ... </div>

Here you can find more information.

Howarto
  • 124
  • 1
  • 8