Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Javascript's tabIndex property cross-browser?

I had a problem, and this answer solved it. It uses the property tabIndex.

Is this property cross-browser? Which browsers support it?

Normally I would use Google for this, but oddly, nothing about this (except w3schools) appeared in my search query, and w3schools is terrible and doesn't show which browser versions are supported, only which browsers. MDN doesn't say anything about it either.

like image 358
tckmn Avatar asked Jul 18 '13 07:07

tckmn


People also ask

What is Tabindex property?

Definition and Usage The tabIndex property sets or returns the value of the tabindex attribute of an element. The tabindex attribute specifies the tab order of an element, when the "tab" button is used for navigating.

What is the meaning of Tabindex =- 1?

A negative value (usually tabindex="-1" ) means that the element is not reachable via sequential keyboard navigation, but could be focused with JavaScript or visually by clicking with the mouse. It's mostly useful to create accessible widgets with JavaScript.

Is Tabindex accessible?

tabindex is a global attribute that allows an HTML element to receive focus. It needs a value of zero or a negative number in order to work in an accessible way. When tabindex 's value is set to zero or a positive number, the element can be navigated to via the keyboard's Tab key.

When should you not use Tabindex?

When positive numbers are used for tabindex , those elements become the first things users tab to in a web page. The result is that items on the page are placed out of order in terms of tab flow.


1 Answers

tabIndex is so old, it has been standard since the earliest versions of browsers. In fact, it might even have been a part of the first ever HTML spec, although I can't say that for certain.

Basically, the reason you can't find compatibility tables is because everything supports it.

like image 57
Niet the Dark Absol Avatar answered Sep 22 '22 20:09

Niet the Dark Absol