Skip to content
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

Ability to Trigger Slider Focus #738

Closed
rizedr opened this issue May 1, 2017 · 2 comments
Closed

Ability to Trigger Slider Focus #738

rizedr opened this issue May 1, 2017 · 2 comments
Labels

Comments

@rizedr
Copy link

rizedr commented May 1, 2017

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.

@Grsmto
Copy link

Grsmto commented Aug 8, 2017

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!

@stale
Copy link

stale bot commented Mar 24, 2018

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.

@stale stale bot added the stale label Mar 24, 2018
@stale stale bot closed this as completed Mar 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants