Skip to content

Animate scroll offset for accessibility scroll actions - #191660

Draft
kaluli123123 wants to merge 2 commits into
flutter:masterfrom
kaluli123123:fix-semantics-scroll-animation-64279
Draft

kaluli123123 wants to merge 2 commits into
flutter:masterfrom
kaluli123123:fix-semantics-scroll-animation-64279

Conversation

@kaluli123123

@kaluli123123 kaluli123123 commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

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

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
@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) f: scrolling Viewports, list views, slivers, etc. labels Aug 25, 2026
Convert semantic drag deltas using the scroll axis direction, matching pointer-driven scrolling. Cover both physical axes, text directions and reverse settings.
@kaluli123123

Copy link
Copy Markdown
Contributor Author

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 scrollable_semantics_test.dart run passed all 29 tests. The complete scrollable_test.dart and scroll_activity_test.dart run also passed all 103 tests. Focused analysis reported no issues and formatting was unchanged. Validation used this PR checkout and its matching engine artifacts (773d8b3b068886a279acc1e3f23ce4710bbaac72).

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility scroll in iOS does not match native

1 participant