←back to thread

Just use a button

(gomakethings.com)
284 points moebrowne | 1 comments | | HN request time: 0.283s | source
Show context
bugsliker ◴[] No.45774539[source]
- tabindex=0 doesn’t affect ordering, does it?

- why do you need to listen for events at the document level?

not that i disagree with the article, but some arguments didn’t seem right.

replies(2): >>45774646 #>>45774711 #
thyristan ◴[] No.45774646[source]
> - tabindex=0 doesn’t affect ordering, does it?

Of course it does. tabindex=0 doesn't sort naturally into the automatic tabindex order, it sorts AFTER everything. So you are jumping through all the other tabindex elements, then you are jumping back to all tabindex=0.

replies(4): >>45774767 #>>45774845 #>>45775649 #>>45777072 #
brandonhorst ◴[] No.45774767[source]
This is incorrect. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...
replies(2): >>45775062 #>>45775138 #
1. thyristan ◴[] No.45775062[source]
That is correct. From your link: "tabindex="0" means that the element should be focusable in sequential keyboard navigation, after any positive tabindex values. The focus navigation order of these elements is defined by their order in the document source. "