function getNextFocusElement(current = -1) {
    const btns = document.querySelectorAll('.gbtn[data-taborder]:not(.disabled)');
    if (!btns.length) {
        return false;
    }

    if (btns.length == 1) {
        return btns[0];
    }

    if (typeof current == 'string') {
        current = parseInt(current);
    }

    const orders = [];
    each(btns, (btn) => {
        orders.push(btn.getAttribute('data-taborder'));
    });
    const highestOrder = Math.max.apply(Math, orders.map((order) => parseInt(order)));

    let newIndex = current < 0 ? 1 : current + 1;
    if (newIndex > highestOrder) {
        newIndex = '1';
    }

    const nextOrders = orders.filter((el) => el >= parseInt(newIndex));
    const nextFocus = nextOrders.sort()[0];

    return document.querySelector(`.gbtn[data-taborder="${nextFocus}"]`);
}
Keyboard Navigation
Allow navigation using the keyboard

@param {object} instance