0

From MDN Docs:

The maximum value for tabindex is 32767

I see the number is 215-1, so it's probably related to 16bit or 32bit integers. But how is this related to HTML? Is it a limitation from the browser? Where does this number come from?

Update

I don't know why this question got closed.

Yes, W3 defined that this is the maximum for tabindex.
Yes, this number is calculated by 215-1.

What I'm asking is WHY tabindex's maximum value is that? Is it related to the browser? Operating system? HTML? Screen Readers?

Shahriar
  • 1,855
  • 2
  • 21
  • 45
  • Since it's exactly (2^15)-1 -- I am assuming that the count starts at 0 which would make sense if, when the browser renders, the tab index is stored in an array. But 2^15 admittedly seems arbitrary .. Why not 2^10 or 2^20? There has to be some logic behind the number. – Zak Dec 22 '21 at 20:46
  • Yes... that -1 is because `0-32767 = 32768 numbers`. But as you just said, there has to be some logic behind it. – Shahriar Dec 22 '21 at 21:01
  • 1
    Logic: Someone picked it. :) – epascarello Dec 23 '21 at 17:37
  • @epascarello :-] – Shahriar Jan 08 '22 at 19:58

0 Answers0