Skip to content

Commit a4688bb

Browse files
committed
refactor(CCarousel): improve accessibility
1 parent 81d43e9 commit a4688bb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/coreui-react/src/components/carousel/CCarousel.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ export const CCarousel = forwardRef<HTMLDivElement, CCarouselProps>(
256256
active: active === index
257257
})}
258258
data-coreui-target=""
259+
{...(active === index && { 'aria-current': true })}
260+
aria-label={`Slide ${index + 1}`}
259261
/>
260262
)
261263
})}

0 commit comments

Comments
 (0)