Skip to content

Commit

Permalink
Merge pull request #38 from NASA-IMPACT/carousel-fix
Browse files Browse the repository at this point in the history
Double button on carousel fix
  • Loading branch information
hanbyul-here authored Nov 17, 2023
2 parents b8818fd + d798343 commit 7fa5afe
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions overrides/common/embedded-video-carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ export default function Carousel({ items }: EmbeddedVideosPropType) {
<DotGroup
renderDots={(props) => {
return (
<span>
{props.currentSlide + 1}/{items.length + 1}
<span aria-live="polite">
<SROnly>Current slide: </SROnly>
{props.currentSlide + 1}
<SROnly>Total of </SROnly>/{items.length + 1}
</span>
);
}}
Expand Down Expand Up @@ -178,20 +180,6 @@ export default function Carousel({ items }: EmbeddedVideosPropType) {
</Slider>
</FeaturedList>
</div>
{items.length > 1 && (
<ButtonGroup
topHeight={height}
role="group"
aria-label="Slide controls"
>
<ButtonBackStyled>
<CollecticonChevronLeft title="Go to previous slide" meaningful />
</ButtonBackStyled>
<ButtonNextStyled>
<CollecticonChevronRight title="Go to next slide" meaningful />
</ButtonNextStyled>
</ButtonGroup>
)}
</CarouselProvider>
</Lazyload>
);
Expand Down

0 comments on commit 7fa5afe

Please sign in to comment.