From c6204ce0c501b6f49647879bf04b85971627f142 Mon Sep 17 00:00:00 2001 From: Kiven <412386861@qq.com> Date: Mon, 12 May 2025 18:40:53 +0800 Subject: [PATCH 1/2] Update Star.tsx fix tabIndex --- src/Star.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Star.tsx b/src/Star.tsx index 7243069..d3b01bb 100644 --- a/src/Star.tsx +++ b/src/Star.tsx @@ -17,6 +17,7 @@ export interface StarProps { characterRender?: (origin: React.ReactElement, props: StarProps) => React.ReactNode; focused?: boolean; count?: number; + tabIndex?: numner; } function Star(props: StarProps, ref: React.Ref) { @@ -32,6 +33,7 @@ function Star(props: StarProps, ref: React.Ref) { focused, onHover, onClick, + tabIndex, } = props; // =========================== Events =========================== @@ -86,7 +88,7 @@ function Star(props: StarProps, ref: React.Ref) { aria-checked={value > index ? 'true' : 'false'} aria-posinset={index + 1} aria-setsize={count} - tabIndex={disabled ? -1 : 0} + tabIndex={disabled ? -1 : tabIndex} >
{characterNode}
{characterNode}
From 4c308a87286a1757cf0a73002ecf66ab9455bf75 Mon Sep 17 00:00:00 2001 From: Kiven <412386861@qq.com> Date: Mon, 12 May 2025 18:47:21 +0800 Subject: [PATCH 2/2] Update Star.tsx --- src/Star.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Star.tsx b/src/Star.tsx index d3b01bb..82a0fa4 100644 --- a/src/Star.tsx +++ b/src/Star.tsx @@ -17,7 +17,7 @@ export interface StarProps { characterRender?: (origin: React.ReactElement, props: StarProps) => React.ReactNode; focused?: boolean; count?: number; - tabIndex?: numner; + tabIndex?: number; } function Star(props: StarProps, ref: React.Ref) {