The accessibility property is very useful as it gives the user the possibility to navigate with the slider using their arrow keys, however, in my opinion, it fails because a focus event needs to happen on the slider in order for the navigation to work.
I think it would be a good addition to add a property to trigger the focus event where you need it.
In my scenario, I am presenting a gallery in a modal and would like to give the user the possibility to navigate using arrow keys as soon as the modal opens.
You can trigger focus this way:
this.slider.innerSlider.list.setAttribute('tabindex', 0);
this.slider.innerSlider.list.focus();
this.slider being a ref to the Slider component.
Also make sure your fadein/appear animations are finished before calling focus or it won't work!
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.
Most helpful comment
You can trigger focus this way:
this.sliderbeing a ref to theSlidercomponent.Also make sure your fadein/appear animations are finished before calling
focusor it won't work!