MultiDev
MultiDev

Reputation: 10649

Tabindex not working for button

I am using a button to submit my form, but tabindex works on everything, but skips over the button. I can't get the button to highlight using the tab key at all.

<button type="submit" class="button" tabindex="11">Submit</button>

Any ideas?

Upvotes: 0

Views: 4600

Answers (2)

Khaltazar
Khaltazar

Reputation: 296

I just tried to create this issue but my example works.

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<input type="text" tabindex="1" />
<input type="text" tabindex="2" />
<input type="text" tabindex="3" />
<input type="text" tabindex="4" />
<button type="submit" tabindex="5">Submit</button>
</body>
</html>
  1. Is 11 for sure the next tabindex (maybe you are missing one)?
  2. What browser are you using?

Edit: This example works for me in IE, Firefox, and Chrome.

Edit 2: Here is a jsfiddle link showing it working fine: jsfiddle

Upvotes: 1

Joe T. Boka
Joe T. Boka

Reputation: 6581

I would try this:

<input class="submit" type="submit" tabindex="11" value="Submit">

Upvotes: 0

Related Questions