Skip to content

Feat: added tabindex logic for better accessibility support #2422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

oggo-petersen
Copy link

This PR aims to add tabIndex support for better accessibility, since all tabIndex inside the project are always set to -1.

The main solution consists into:

src/track.js

Added the correct tabIndex based on the class slick-active

src/slider.js

This one was a little bit more complex to add the support, so I went with the IntersectionObserver, which will add to the element itself the correct tabIndex.
We also use a list of refs to add the observer correctly to the elements rendered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants