Skip to content

ListView: implicit scrolling doesn't work with iOS VoiceOver when shrinkWrap is enabled #79457

Open

Description

@jjoelson

Steps to Reproduce

  1. Run application on an iOS device (I tested on an iPhone 6s, iOS 14.4.1):
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(
        appBar: AppBar(
          title: Text("ListView.builder Accessibility"),
        ),
        body: ListView.builder(
          shrinkWrap: true,
          itemBuilder: (BuildContext context, int index) {
            return Padding(
              padding: const EdgeInsets.all(16.0),
              child: Text('$index'),
            );
          },
        ),
      ),
    );
  }
}
  1. Enable VoiceOver.
  2. Swipe left repeatedly to cycle accessibility focus through the list children.

Expected results:

The list view should implicitly scroll as necessary, with VoiceOver focusing on the next child as it comes onto the screen. This works as expected on Android.

Actual results:

The list view does not scroll and subsequent list children are not focused.

Details
$ flutter analyze
Analyzing listview_builder_accessibility...                             
No issues found! (ran in 10.2s)
$ flutter doctor -v
[✓] Flutter (Channel stable, 2.0.3, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-US)
    • Flutter version 2.0.3 at /Users/jonathan.joelson/repos/flutter
    • Framework revision 4d7946a68d (8 days ago), 2021-03-18 17:24:33 -0700
    • Engine revision 3459eb2436
    • Dart version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/jonathan.joelson/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.54.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.20.0

[✓] Connected device (3 available)
    • Pixel 4a (mobile)                  • 0B201JEC221560                           • android-arm64 • Android 11 (API 30)
    • Jonathan Joelson’s iPhone (mobile) • 5adff574a1e6e01ea07fbce2fbfd86e78dd84167 • ios           • iOS 14.4.1
    • iPhone 12 Pro (mobile)             • 6466B0CE-0126-49BE-886F-4376707E20C9     • ios           • com.apple.CoreSimulator.SimRuntime.iOS-14-4
      (simulator)

! Doctor found issues in 1 category.

Activity

  1. darshankawar commented on Apr 1, 2021

    @darshankawar
    Member

    Accessibility reads the last item visible on screen but then swiping left, doesn't scroll to next item and reads item 12 (for example) everytime upon swiping.

    flutter doctor -v
    [✓] Flutter (Channel master, 2.1.0-13.0.pre.376, on Mac OS X 10.15.4 19E2269
        darwin-x64, locale en-GB)
        • Flutter version 2.1.0-13.0.pre.376 at
          /Users/dhs/documents/Fluttersdk/flutter
        • Framework revision 1f19fd7108 (2 hours ago), 2021-03-31 21:32:49 -0700
        • Engine revision ec319c85be
        • Dart version 2.13.0 (build 2.13.0-187.0.dev)
    
    [!] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 12.3, Build version 12C33
        ! CocoaPods 1.9.3 out of date (1.10.0 is recommended).
            CocoaPods is used to retrieve the iOS and macOS platform side's plugin
            code that responds to your plugin usage on the Dart side.
            Without CocoaPods, plugins will not work on iOS or macOS.
            For more info, see https://flutter.dev/platform-plugins
          To upgrade see
          https://guides.cocoapods.org/using/getting-started.html#installation for
          instructions.
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] VS Code (version 1.54.3)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.20.0
    
    [✓] Connected device (3 available)
        • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
          • iOS 14.4.1
        • macOS (desktop)           • macos                                    •
          darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
        • Chrome (web)              • chrome                                   •
          web-javascript • Google Chrome 89.0.4389.114
    
    ! Doctor found issues in 1 category.
    
    
  2. added
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    f: scrollingViewports, list views, slivers, etc.
    frameworkflutter/packages/flutter repository. See also f: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    platform-iosiOS applications specifically
    and removed
    in triagePresently being triaged by the triage team
    on Apr 1, 2021
  3. goderbauer commented on Apr 7, 2021

    @goderbauer
    Member
  4. added
    P2Important issues not at the top of the work list
    on May 4, 2022
  5. kmemo commented on May 31, 2023

    @kmemo

    Hi, with the default settings of iOS's VoiceOver, I believe that 3-finger vertical scroll should scroll the screen.

    However, I also beleve that Flutter's ListView can not be scrolled vertically in this way.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)customer: cabooseSee go/flutter-3p-customer-trackerf: scrollingViewports, list views, slivers, etc.found in release: 2.1Found to occur in 2.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions