simplify tabIndex code; tests still pass