Skip to content

Commit

Permalink
feat(react): add accessibility props to SnapCarouselIndicator
Browse files Browse the repository at this point in the history
  • Loading branch information
Grsmto committed Mar 3, 2023
1 parent 25940e4 commit 819e769
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react/src/SnapCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ export const SnapCarouselIndicator = React.forwardRef(
}`}
ref={ref}
onClick={handleClick}
aria-label={`Go to slide ${index + 1}`}
aria-selected={index === _activeIndex ? 'true' : 'false'}
type={RootTag === 'button' ? 'button' : undefined}
{...otherProps}
/>
);
Expand Down

0 comments on commit 819e769

Please sign in to comment.