Skip to content
This repository has been archived by the owner on Mar 21, 2018. It is now read-only.

Keyboard Accessibility #3

Merged
merged 5 commits into from
Oct 22, 2012
Merged

Conversation

abitgone
Copy link
Owner

Implements keyboard accessibility, as requested by @mattmachel in issue #2, with the following features:

  • Carousels will respond to up and down on vertically scrolling carousels, left and right on horizontally scrolling carousels and all four directions on class-only carousels.
  • Carousels with focus will prevent scrolling the page in the browser - this is by design.
  • Carousels with focus will prevent automatic cycling through the carousel items.

Giving carousels tabindex of zero to allow them to be focused.
Listening for up, down, left and right to progress the sliders.
e.preventDefault() doesn't seem to be stopping the web page from
scrolling. Need to look into this.
Fixes an issue where the page scrolled on key presses, despite the fact
that the carousel had focus.
Left/right keys will work on horizontal carousels, up/down on vertical.
All keys will work on class-only carousels. Additionally, since
touch_lock_* are now used to implement this functionality, I've renamed
them to lock_*, and simplified the case statements into if/else blocks.
For keyboard users, this is the equivalent of mouseenter/mouseleave.
abitgone added a commit that referenced this pull request Oct 22, 2012
@abitgone abitgone merged commit 4ec8198 into master Oct 22, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant