diff --git a/frontend/src/components/ProgressIndicator/ProgressIndicator.tsx b/frontend/src/components/ProgressIndicator/ProgressIndicator.tsx index c184946406..e02326fad3 100644 --- a/frontend/src/components/ProgressIndicator/ProgressIndicator.tsx +++ b/frontend/src/components/ProgressIndicator/ProgressIndicator.tsx @@ -1,18 +1,21 @@ import { useMemo } from 'react' -import { Box } from '@chakra-ui/react' +import { Box, BoxProps } from '@chakra-ui/react' import { MotionBox } from '~components/motion' const ActiveIndicator = (): JSX.Element => ( ) -interface CircleIndicatorProps { +interface CircleIndicatorProps extends BoxProps { onClick: () => void isActiveIndicator: boolean } @@ -20,16 +23,29 @@ interface CircleIndicatorProps { const CircleIndicator = ({ onClick, isActiveIndicator, + ...props }: CircleIndicatorProps): JSX.Element => { return ( ) } @@ -51,7 +67,7 @@ export const ProgressIndicator = ({ ) const animationProps = useMemo(() => { - return { x: currActiveIdx.toString() + 'rem' } + return { x: `${currActiveIdx + 0.125}rem` } }, [currActiveIdx]) return ( @@ -61,6 +77,7 @@ export const ProgressIndicator = ({ key={idx} isActiveIndicator={idx === currActiveIdx} onClick={() => onClick(idx)} + aria-label={`Page ${idx + 1} of ${numIndicators}`} /> ))}