diff --git a/src/Star.tsx b/src/Star.tsx index 7243069..82a0fa4 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?: number; } 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}