Fix data-tabindex bug

When using data-tabindex with more than two items, focus only switches
between the first and last item. This fixes to correctly tab through
items and in the proper tabindex order.