diff --git a/packages/utils/lib/main.ts b/packages/utils/lib/main.ts index 76ed46d..be03021 100644 --- a/packages/utils/lib/main.ts +++ b/packages/utils/lib/main.ts @@ -22,11 +22,11 @@ export function filterKeyEsc(handler: (e: React.KeyboardEvent) => void) { export function accessibleOnClick( handler: (e: React.KeyboardEvent) => void, - tabIndex: number + tabIndex?: number ) { return { role: "button", - tabIndex: tabIndex || 0, + tabIndex: tabIndex ?? 0, onKeyDown: filterKeyEnter(handler), onClick: handler, };