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

Use the keyboard to navigate between sliders #112

Closed
CharlyJazz opened this issue Oct 9, 2018 · 4 comments
Closed

Use the keyboard to navigate between sliders #112

CharlyJazz opened this issue Oct 9, 2018 · 4 comments

Comments

@CharlyJazz
Copy link

I would like to work on this new feature.

Increase the accessibility of the carousel.

It would be a new prop

@amio
Copy link
Owner

amio commented Oct 10, 2018

Nice feature, currently it can be achieved using widgets api:

export default class KeyboardNavigator extends React.Component {
  componentDidMount () {
    const { index, total, loop, prevHandler, nextHandler } = props
    // Add event listener, call prevHandler/nextHandler on keypress
  }
  componentWillUnmount () {
    // Cleanup event listeners.
  }
  render () { return null }
}

@CharlyJazz
Copy link
Author

So we should not work on this, as a feature?

@amio
Copy link
Owner

amio commented Oct 10, 2018

Since it's not too much burden to achieve (like Buttons, IndicatorDots), I'd like to keep the core feature as simple as possible.

Similar use cases may vary, navigation could be caused by keypress, key combination, gesture, maybe more. So I prefer to expose a simple api to support these, other than make them built-in feature. What do you think?

@CharlyJazz
Copy link
Author

I agree, but then we should add that in the documention because the accessibility its a important goal

@amio amio closed this as completed in f6d06ef Oct 24, 2018
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

No branches or pull requests

2 participants