keyboard navigation works correctly after reordering nodes