Module screen_reader_touch
Expand description
Explore by touch: what a finger means while the built-in screen reader is on, as TalkBack and VoiceOver read it.
- A finger resting or dragging on the screen explores: the item under it is spoken and the reading cursor moves there, and nothing is pressed. Lifting the finger leaves the cursor where it is.
- A quick tap explores the item under it too, once it is clear no second tap follows.
- A double tap anywhere activates the item the cursor is on.
- A quick one-finger swipe right or left moves to the next or previous item.
A second finger ends the gesture: nothing more is read from the contacts until every finger has lifted.
One recognizer for every host. It is pure: the host passes each contact
in the window’s logical pixels with its time, arms a timer for
TouchExplorer::deadline and calls TouchExplorer::poll when it
fires. A finger that has not yet moved past TAP_SLOP is not read
until EXPLORE_DELAY has passed, so the start of a swipe or the first
tap of a double tap never moves the cursor.
Structs§
- Touch
Explorer - Reads one-finger touches as the screen reader’s gestures.
Enums§
- Explore
Gesture - What a finger asked the screen reader for.
Constants§
- DOUBLE_
TAP_ SLOP - How far, in logical pixels, the second tap of a double tap may land from the first.
- DOUBLE_
TAP_ TIMEOUT - The longest wait between a tap’s lift and the second tap’s touch.
- EXPLORE_
DELAY - How long a resting finger waits before it explores, so a tap or the start of a swipe reads nothing.
- SWIPE_
MAX - The longest a swipe takes from touch to lift; a slower movement explores.
- SWIPE_
MIN - The shortest horizontal distance, in logical pixels, a swipe covers.
- TAP_
SLOP - How far, in logical pixels, a finger travels before it is moving rather than resting.