docs: function focusElement(tabStopElements, direction) {
    let start = 0;
    let end = tabStopElements.length - 1;
    let increment = 1;
    if (direction === "previous") {
      start = tabStopElements.length - 1;
      end = 0;
      increment = -1;
    }
  
    let current = document.activeElement.tabIndex;
    if (current === -1 && direction === "previous") {
      current = tabStopElements[tabStopElements.length - 1].tabIndex + 1;
    }
  
    for (let i = start; i * increment <= end * increment; i += increment) {
      if (tabStopElements[i].tabIndex * increment > current * increment && isTabStopElement(tabStopElements[i])) {
        tabStopElements[i].focus();
        return;
      }
    }
    for (let i = start; i * increment <= current * increment; i += increment) {
      if (isTabStopElement(tabStopElements[i])) {
        tabStopElements[i].focus();
        return;
      }
    }
  }