How to handle tab
keypress using react-slick-slider
?
It moves through slides, but it does not change the active one.
Here is the demo: https://codesandbox.io/s/slick-slider-tab-docbw5
When you navigate through slides via Tab
button, it moves to the right, but the active slide does not change. You can see it in the dots, the active one is still at position 1. Also when you reach the end, you can still press the next button, but you can't the prev button, since the active one is still the first one.
Also with Shift
+ Tab
it moves to the last one, but still does not change the active one.
What is the proper way to handle that? Adding tab index -1 is not the solution I am looking for.