JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<thead></thead>
<tbody>
<tr>
<td> 1<input type="text" maxlength="1" oninput="focusNextElement(this)" id="a" name="a" tabeindex="1"></td>
<td>3<input type="text" maxlength="1" oninput="focusNextElement(this)" id="b" name="b" tabeindex="3" disabled></td>
<td>5<input type="text" maxlength="1" oninput="focusNextElement(this)" id="c" name="c" tabeindex="5">
</td></tr>
<tr>
<td>2 <input type="text" maxlength="1" oninput="focusNextElement(this)" id="d" name="d" tabeindex="2"></td>
<td>4<input type="text" maxlength="1" oninput="focusNextElement(this)" id="e" name="e" tabeindex="4"></td>
<td>6<input type="text" maxlength="1" oninput="focusNextElement(this)" id="f" name="f" tabeindex="6""></td>
</tr>
</tbody>
</table>
JavaScript
const inputs = document.querySelectorAll('input:not([disabled])')
function focusNextElement (input) {
const nextIndex = [...inputs].findIndex(i => i === input) + 1
if (inputs[nextIndex]) {
inputs[nextIndex].focus()
}
}