googlearchive / polymer-gestures

84 stars 27 forks source link

Enable tap from some keyboard buttons #44

Open dfreedm opened 10 years ago

dfreedm commented 10 years ago

Need to support a few keyboard buttons on a few elements to allow tap to be a full fidelity click replacement:

spacebar (on non input elements) enter (on non input elements) up/down (radio buttons) ? Related to Polymer/polymer#255

dfreedm commented 10 years ago

Ported from https://github.com/Polymer/PointerGestures/issues/12

plato-cambrian commented 10 years ago

+1

kbwatts commented 9 years ago

+1

kbwatts commented 9 years ago

The fact that on-tap ruins accessibility for keyboard users is actually a pretty serious issue. Built-in accessibility is one of the huge selling points for using the Polymer framework (among many other inspiring selling points). Correct me if I'm wrong, but as I understand it, on-tap is meant to be the "Finally, one-solution-to-rule-them-all" bridge between on-click and touch events, agnostic to whatever device or platform it happens to find itself on. If it breaks accessibility, then it renders the whole point of itself useless and as a result we're now going back to on-click events, which sucks when you know a far better solution is sitting right there, just beyond reach.

Please, don't let on-tap's lack of keyboard accessibility be a barrier to what helps Polymer become The Next Big Thing.

dfreedm commented 9 years ago

The next version (0.8+) of polymer-gestures will use click to fire tap instead of mousedown/mouseup pairs, which I believe will achieve what you're looking for.

In the meantime, the core-a11y-keys element provides keyboard driven callbacks for this use case, as well as more advanced use cases such as radio buttons, sliders, etc.

kbwatts commented 9 years ago

That's exactly what I was hoping for - thanks for your quick reply. We'll do our best for now until 0.8 :)