Safari ignoring tabindex

前端 未结 7 1775
野的像风
野的像风 2020-12-07 19:49

I have 2 buttons next to a textbox and another textbox after the 2 buttons. The tabindex for the first textbox is 1000, the first button is 1001 and the second button is 10

相关标签:
7条回答
  • 2020-12-07 20:42

    I tried the following with Safari 5.1.5. I don't know how it works with older versions:

    When "highlighting each item on a page" (see answer by graphicdivine) is disabled, you can use that function by pressing Option(alt) + tab.

    If you don't (and the option is disabled), Safari will by default tab through all form-fields (like input, textarea, select...). For this fields, it will also accept/regard a tabindex. It will first tab through all form elements with a tabindex (in the order of the given indices) and then through the rest of the form elements in the order of their definition in HTML.

    So if you define a tabindex="1" (or 1001) and "3" (or 1003) for two input-elements Safari will first focus this fields and then the others.

    0 讨论(0)
提交回复
热议问题