1

How can I include all the components in the html page - so each time I press TAB, I get the next element in the page, including labels!! for example:

    <div class="input">
        <h1 tabindex="0">I need that all the components will be in the list of tab-order, Including labels!</h1>
        <label class="narrow-control label-top-right" for="txtName">name:</label>
        <input type="text" name="txtName" class="inputText"/>
        <label class="narrow-control label-top-right" for="txtAge">age:</label>
        <input type="text" name="txtAge" class="inputText"/>
    </div>
AliNajafZadeh
  • 1,216
  • 2
  • 13
  • 22
ZoharYosef
  • 247
  • 1
  • 2
  • 11
  • 1
    What does "get the next element in the page" mean? Get how? Why? – PeeHaa Oct 14 '15 at 13:59
  • 1
    @PeeHaa when the user press on tab - the first element will be focus, in the example - h1, after i want to be focus on the label... how can I do it? – ZoharYosef Oct 14 '15 at 14:08
  • 1
    Dupe http://stackoverflow.com/q/5978239/508666. A label cannot be focused. What would it do – PeeHaa Oct 14 '15 at 14:37
  • 1
    Does this answer your question? [Anyway to have a label respond to :focus CSS](https://stackoverflow.com/questions/5978239/anyway-to-have-a-label-respond-to-focus-css) – Rohit Gupta Sep 05 '22 at 10:38

0 Answers0