From HTML5 spec:
The tabindex attribute, if specified, must have a value that is a valid integer. If the attribute is specified, it must be parsed using the rules for parsing integers. If parsing the value returns an error, the attribute is ignored for the purposes of focus management (as if it wasn't specified).
This element should be focusable PASSED
.tabIndex=10 getAttribute('tabindex')=' 10'
This element shouldn't be focusable PASSED
.tabIndex=-1 getAttribute('tabindex')='one'
This element should be focusable PASSED
.tabIndex=7 getAttribute('tabindex')='007'
This element should be focusable PASSED
.tabIndex=1 getAttribute('tabindex')='1px'
This element should be focusable PASSED
.tabIndex=0 getAttribute('tabindex')='-0'
This element shouldn't be focusable PASSED
.tabIndex=-1 getAttribute('tabindex')=''
This element should be focusable PASSED
.tabIndex=-4 getAttribute('tabindex')='-004'