code: function moveFocusToIndex(idx, elements) {
          if (idx < 0) {
            idx = elements.length - 1;
          } else if (idx >= elements.length) {
            idx = 0;
          }
  
          if (elements[idx]) {
            elements[idx].focus();
          }
  
          return idx;
        }
docs: Moves the focus to the specified index within the elements list.
  This will scope the index to the size of the element list if it changed.
  
  @private
  @param {Number} idx Specified index to move to.
  @param {Array} elements Array with dom elements to move focus within.
  @return {Number} Input index or a changed index if it was out of range.