For accessibility reasons, the first invalid input in a form ought to be focused upon form submission. This prevents the non-sighted user from being forced to hunt for the invalid inputs.
My question pertains to tab order. After the first invalid input is focused, when the user clicks tab again, should the focus go to the next invalid input or just the next element in the normal tab order?
Take this pseudo code for example. If input numbers 2 and 4 have errors, when the form is submitted then focus will be moved to input number 2. The next time the user presses the tab
key does the focus go to input 3 or 4?
<input id="1">
<input id="2"> <-- invalid
<input id="3">
<input id="4"> <-- invalid
<input id="5">
<button type="submit">
Focus the next element in the normal tab order. Tab order should remain 1-2-3-4-5.