diff --git a/packages/utils/dom/aria.ts b/packages/utils/dom/aria.ts index 67e6fbe68b..1132f3803e 100644 --- a/packages/utils/dom/aria.ts +++ b/packages/utils/dom/aria.ts @@ -1,6 +1,3 @@ -// @ts-nocheck -import type { Nullable } from '../typescript' - const FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])` /** @@ -114,7 +111,7 @@ export const getSibling = ( el: HTMLElement, distance: number, elClass: string -): Nullable => { +) => { const { parentNode } = el if (!parentNode) return null const siblings = parentNode.querySelectorAll(elClass) @@ -122,7 +119,7 @@ export const getSibling = ( return siblings[index + distance] || null } -export const focusNode = (el) => { +export const focusNode = (el: HTMLElement) => { if (!el) return el.focus() !isLeaf(el) && el.click()