const KEYBOARD_FOCUSABLE_SELECTOR = 'a[href], button, input, textarea, select, details, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';
function getKeyboardFocusableElements(element) {
  if (!element) return [];
  const elements = element.querySelectorAll(KEYBOARD_FOCUSABLE_SELECTOR);
  return Array.from(elements).filter(
    (el) => !el.hasAttribute("disabled") && !el.getAttribute("aria-hidden") && !el.getAttribute("inert") && !(globalThis.getComputedStyle(el).display === "none")
  );
}

export { KEYBOARD_FOCUSABLE_SELECTOR as K, getKeyboardFocusableElements as g };
//# sourceMappingURL=getKeyboardFocusableElements-B_U9rt6y.js.map
