4 ms·
`tabindex=0` actually does something else than (what I understand) you think it does. Normally an <a> element can only be clicked+focused if it has a href or a
by grenoire 6y ago
`tabindex=0` actually does something else than (what I understand) you think it does.
Normally an <a> element can only be clicked+focused if it has a href or a tabindex. A tabindex of 0 will make it clickable+focusable, without having a href on it, making it behave like a button.
It doesn't make it unclickable/untabbable, simply an alternative to href without a # (as an empty href will also not be clickable).
- gostsamo 6y agoStill on the MDN example. The browsing mode reads the nont-tabbable element but when I try to focus it with object navigation, it says unknown. However, if I move to it from the previous object it reads the text but still does not interact. I'm not sure what would happen if the element is an anchor but I'd bet on "WTF is this supposed to do".