-2

I'm making a code in javascript right now its really beyond simple but I honestly know nothing about javascript i've been learning for maybe 4 days. so basically I just need a while loop that presses tab every time it loops.

1 Answers1

0

Focus Next Element In Tab Index provides code for advancing focus to the next tabIndexed element.

Or if you're not using tabindex, then it would simply be the next focusable area

Exactly which elements qualify to be focusable areas appears to be platform dependent although there is a recommended list:

Modulo platform conventions, it is suggested that for the following elements, the tabindex focus flag be set:

  • a elements that have an href attribute
  • link elements that have an href attribute
  • button elements
  • input elements whose type attribute are not in the Hidden state
  • select elements
  • textarea elements
  • menuitem elements
  • Elements with a draggable attribute set, if that would enable the user agent to allow the user to begin a drag operations for those elements without the use of a pointing device
  • Editing hosts
  • Browsing context containers
  • Sorting interface th elements

Here's some good general information regarding focus: https://html.spec.whatwg.org/multipage/interaction.html#focus

arcyqwerty
  • 10,325
  • 4
  • 47
  • 84