code: function canFocus(elm) {
          if (isTextInputElement(elm) && !elm.hidden) {
            return true;
          }
  
          if (hasTabstopData(elm)) {
            return true;
          }
  
          if (/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(getRole(elm))) {
            return true;
          }
  
          return false;
        }
docs: Returns true/false if the specified element can be focused or not.
  
  @private
  @param {Element} elm DOM element to check if it can be focused or not.
  @return {Boolean} True/false if the element can have focus.