Repository navigation
Animate scroll offset for accessibility scroll actions - #191660
kaluli123123 wants to merge 2 commits into
Conversation
Scroll actions coming from an assistive technology (for example VoiceOver's three finger scroll on iOS) were turned into a synthetic drag gesture by the default semantics delegate of RawGestureDetector. That drag applied the whole scroll increment in a single frame, so the content jumped to its destination while native scroll views animate the same action. Scrollable now installs its own SemanticsGestureDelegate, which animates the scroll position with ScrollPosition.moveTo instead of synthesizing a drag. The set of exposed scroll actions is unchanged: the actions are still only offered when a drag gesture recognizer is installed and they are still filtered by setSemanticsActions. Fixes flutter#64279
Convert semantic drag deltas using the scroll axis direction, matching pointer-driven scrolling. Cover both physical axes, text directions and reverse settings.
|
Fixed an additional direction regression in f53a949: the animated semantics handler must convert physical drag deltas using the scroll position's axis direction, just as pointer-driven scrolling does. Without that conversion, reversed vertical lists and RTL/reversed horizontal lists can remain at offset zero when the accessibility action should advance them. Added eight axis × reverse × text-direction cases, checking animation in both directions. The initial reproduction observed the reversed cases staying at zero; the final complete The full repository/platform matrix was not run locally. This PR remains a draft; current-head CI, maintainer review and the CICD-label gate still need to complete. |
Scroll actions coming from an assistive technology (for example VoiceOver's
three finger scroll on iOS) were turned into a synthetic drag gesture by the
default semantics delegate of RawGestureDetector. That drag applied the whole
scroll increment in a single frame, so the content jumped to its destination
while native scroll views animate the same action.
Scrollable now installs its own SemanticsGestureDelegate, which animates the
scroll position with ScrollPosition.moveTo instead of synthesizing a drag. The
set of exposed scroll actions is unchanged: the actions are still only offered
when a drag gesture recognizer is installed and they are still filtered by
setSemanticsActions.
Fixes #64279
This AI-assisted draft remains pending the contributor's review and understanding of the code.
Pre-launch Checklist
///).