export const FOCUSABLE_SELECTOR = 'a[href], area[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, [tabindex]:not([tabindex="-1"]), [contenteditable]' export const isNaturallyFocusable = (el: HTMLElement) => { const node = el.nodeName.toLowerCase() if (node === 'a') return (el as HTMLAnchorElement).hasAttribute('href') if (['input', 'select', 'textarea', 'button', 'iframe'].includes(node)) { return !(el as HTMLButtonElement).hasAttribute('disabled') } return false }