diff --git a/packages/vant/src/checkbox/Checker.tsx b/packages/vant/src/checkbox/Checker.tsx index 286e56f3e..927ff9136 100644 --- a/packages/vant/src/checkbox/Checker.tsx +++ b/packages/vant/src/checkbox/Checker.tsx @@ -131,7 +131,7 @@ export default defineComponent({ }, direction.value, ])} - tabindex={disabled.value ? -1 : 0} + tabindex={disabled.value ? undefined : 0} aria-checked={props.checked} onClick={onClick} > diff --git a/packages/vant/src/checkbox/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/checkbox/test/__snapshots__/demo.spec.ts.snap index e1ec46ec4..23931ec5e 100644 --- a/packages/vant/src/checkbox/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/checkbox/test/__snapshots__/demo.spec.ts.snap @@ -19,7 +19,6 @@ exports[`should render demo and match snapshot 1`] = `