code: function controlledByATab(element) {
          var controlledBy = document.querySelectorAll('[role="tab"][aria-controls="' + element.id + '"]')
          return element.id && (controlledBy.length === 1);
      }
docs: Checks if the tabpanel is controlled by a tab
  @param {Element} element the tabpanel element
  @returns {*|boolean}