src/utils/TabManager.js
/**
   * Checks whether the passed element is focusable.
   * @param {HTMLAnchorElement | HTMLInputElement | ElementContentEditable} element
   */
Checks whether the passed element is focusable.
Checks whether the passed element is focusable .
isFocusableElement(element) {
    const nodeName = element.nodeName.toLowerCase();
    const isFocusable = focusableElements.includes(nodeName);
    if (nodeName === 'a' && element.getAttribute('href')) return true;
    if (isFocusable) return !element.disabled;
    if (element.getAttribute('contenteditable') === 'true') return true;
    return !Number.isNaN(parseFloat(element.getAttribute('tabindex')));
  }
isFocusableElement ( element ) { const nodeName = element . nodeName . toLowerCase ( ) ; const isFocusable = focusableElements . includes ( nodeName ) ; if ( nodeName === 'a' && element . getAttribute ( 'href' ) ) return true ; if ( isFocusable ) return ! element . disabled ; if ( element . getAttribute ( 'contenteditable' ) === 'true' ) return true ; return ! Number . isNaN ( parseFloat ( element . getAttribute ( 'tabindex' ) ) ) ; }
Checks whether the passed element is focusable.
Checks whether the passed element is focusable .
// if its an anchor, its focusable // if is directly focusable