News for hackers. Stuff that matters.
Re:Just Use a Button by minitech on Friday October 31, 2025 @05:47PM (#45777072)
tabindex=0 does sort naturally into the automatic tabindex order.

> So you are jumping through all the other tabindex elements

This part is correct (for elements with an explicit positive tabindex), which is why specifying an explicit positive tabindex is considered a code smell. If you don’t specify a tabindex on an element that’s focusable by default, it behaves like tabindex=0.

Try it:

  data:text/html,<button>foo</button><i tabindex=0>bar</i><button>baz</button>

There are no comments on this comment yet.