sag1v / react-elastic-carousel

A flexible and responsive carousel component for react https://sag1v.github.io/react-elastic-carousel
MIT License
348 stars 150 forks source link

Remove id from ItemWrapper causing duplicate id attributes if more than one carousel is on a page. #249

Closed tylmor closed 1 year ago

tylmor commented 1 year ago

The ItemWrapper has an id attribute of the index of the carousel it is inside. If more than one carousel is on a page, then duplicate id's on the page can occur, thus creating a11y issues.

I propose using the key in the click event instead of an id attribute and removing passing down id, so we don't create the duplicate id's.

Feel free to ask any questions! Thanks!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.