votingworks / bmd

GNU General Public License v3.0
13 stars 7 forks source link

Handle all presses: long and short #334

Closed beausmith closed 5 years ago

beausmith commented 5 years ago

Problem

Solutions

Implementation

whitneyq commented 5 years ago

Hi Beau, Your standards whisperer here. The requirements for touchscreen gestures are new. Previous (and continuing) requirements for tactile buttons say:

7.1-N – Tactile keys Mechanically operated controls, buttons, keys, or any other hardware interfaces (including dual switches or sip-and-puff devices) on the voting system available to the voter must:

  1. be tactilely discernible without activating those controls or keys
  2. include a Braille label if there is a text label
  3. not require sequential, timed, or simultaneous presses or activations, unless using a full keyboard.

I know that combo keys and other ways to multiply the usefulness of keys that is common in web apps, but the access advocates have been very firm in saying that it's important to keep the interface as simple as possible for broadest use, even for people who are using unfamiliar AT or are not very digitally savvy.

whitneyq commented 5 years ago

The working group added a new requirement for touchscreen gestures to cover those beyond a basic "tap"

7.2-E – Touchscreen gestures Voting systems with a touch screen may use touchscreen gestures (physical movements by the user while in contact with the screen to activate controls) in the interface if the following conditions are met:

  1. Gestures are offered as another way of interacting with a touch screen and an optional alternative to the other interaction modes.
  2. Gestures are limited to simple, well-known gestures.
  3. Gestures do not include navigation off the current contest.
  4. Gestures are used in a way that does not create accidental activation of an action through an unintended gesture.
  5. Gestures work consistently across the entire voting interaction.
  6. Gestures do not require sequential, timed or simultaneous actions.

Discussion This requirement ensures that the use of gestures does not interfere with the accessibility features of the voting system or make the interface difficult to use by relying on a control mode with no easy way to make them perceivable in the visual or audio formats. In relying on simple and common gestures, this requirement does not intend to fully duplicate the gestures for commercial mobile platforms used with an audio mode for accessibility. Tapping (touching the screen briefly) is the most basic gesture and is used on all touch screens. Other commonly used gestures include: • Pinching or spreading fingers to zoom • Swiping to scroll • Pressing and holding to drag Examples of gestures that require sequential or simultaneous actions are double-tapping, 2, 3 or 4 finger swiping, touch and hold for a set period of time, or those that require coordinated actions with fingers on both hands. On desktop systems, assistive preference options like Sticky Keys can make these complex gestures accessible, but they require familiarity beyond what is acceptable in a voting system. Examples of timed gestures include differentiating between long and short touches or which require touching twice in rapid succession to highlight and then activate the button or selection.

beausmith commented 5 years ago

https://github.com/JedWatson/react-tappable

https://stackoverflow.com/questions/48048957/react-long-press-event

https://github.com/leonaves/react-touch/blob/master/README.md

https://reactjs.org/docs/events.html#touch-events

beausmith commented 5 years ago

This issue was specifically to handle long press, however I have reviewed all the gesture related content from @whitneyq and confirmed that the project currently abides by the guidelines shared in this ticket.