Skip to content

[iOS] [A11y] ListView's addSemanticIndexes/IndexedSemantics don't announce correctly with VoiceOver three-finger tap #93232

Open

Description

@WillowWisp

Steps to Reproduce

  1. Have a ListView.builder with addSemanticIndexes: true (See code sample)
  2. Turn on VoiceOver
  3. Focus a11y on an item of the ListView & tap with three fingers

Expected results:

As documented here, VoiceOver should announce additional info like the index of the focused item.

Apple's document:

Three-finger tap: Speak additional information, such as the position within a list or whether text is selected

https://support.apple.com/guide/iphone/learn-voiceover-gestures-iph3e2e2281/ios

listview_semantics_work.mov

Actual results:

It only announces the absolute position of the item like "center of screen, full width of screen".

listview_semantics_not_work.mov
Code sample
ListView.builder(
  itemCount: 50,
  addSemanticIndexes: true,
  itemBuilder: (context, index) {
    return Column(
      children: [
        Container(
          color: Colors.blue,
          child: Text('Hello world'),
        ),
        Container(
          height: 50,
          child: Text('Test index: $index'),
        ),
      ],
    );
  },
)
flutter doctor -v
[✓] Flutter (Channel stable, 2.5.3, on macOS 11.6 20G165 darwin-x64, locale en)
    • Flutter version 2.5.3 at
      /Users/nguyenthang/Desktop/ThangDev/FlutterSDK/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (3 weeks ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nguyenthang/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/nguyenthang/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 13.1, Build version 13A1030d
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • 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 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.59.0)
    • VS Code at /Users/nguyenthang/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.27.0

[✓] Connected device (2 available)
    • Testflight’s iPad (mobile) • 30f479e7ee4c7fd9518711dd7017eb75383a46db •
      ios            • iOS 14.4.1 18D61
    • Chrome (web)               • chrome                                   •
      web-javascript • Google Chrome 95.0.4638.69

• No issues found!

Activity

  1. mamuseferha commented on Nov 8, 2021

    @mamuseferha

    Hi @WillowWisp, thank you for filing this issue.

    I tested this on the latest master and stable channel and the issue is reproducible

    code sample
    import 'package:flutter/material.dart';
    
    void main() {
      runApp(const Home());
    }
    
    class Home extends StatelessWidget {
      const Home({
        Key? key,
      }) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          theme: ThemeData(
            colorScheme: ColorScheme.fromSwatch(
              primarySwatch: Colors.red,
            ),
          ),
          home: Builder(
            builder: (context) {
              return Scaffold(
                body: ListView.builder(
                  itemCount: 50,
                  semanticChildCount: 50,
                  addSemanticIndexes: true,
                  itemBuilder: (context, index) {
                    return Column(
                      children: [
                        Container(
                          color: Colors.blue,
                          child: Text('Hello world'),
                        ),
                        Container(
                          height: 50,
                          child: Text('Test index: $index'),
                        ),
                      ],
                    );
                  },
                ),
              );
            },
          ),
        );
      }
    }
    
    flutter doctor -v
    [✓] Flutter (Channel stable, 2.5.3, on macOS 11.6.1 20G224 darwin-x64, locale en-US)
        • Flutter version 2.5.3 at /Users/flo/development/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 18116933e7 (3 weeks ago), 2021-10-15 10:46:35 -0700
        • Engine revision d3ea636dc5
        • Dart version 2.14.4
    
    [!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at /Users/flo/Library/Android/sdk
        • Platform android-31, build-tools 31.0.0
        • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
        ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
    
    [✓] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 13.0, Build version 13A5212g
        • CocoaPods version 1.11.0
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2020.3)
        • 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 11.0.10+0-b96-7281165)
    
    [✓] VS Code (version 1.60.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.27.0
    
    [✓] Connected device (4 available)
        • sdk gphone x86 (mobile)    • emulator-5554                        • android-x86    • Android 11 (API 30) (emulator)
        • iPhone (mobile)            • 2cb2f234cda6637b9ad960bd3eae4f38fb3a5896 • ios            • iOS 15.0.2 19A404
        • iPhone 12 Pro Max (mobile) • 98CBBFB1-4069-4A28-B7F7-138911ACBE72 • ios            •
          com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
        • macOS (desktop)            • macos                                • darwin-x64     • macOS 11.6.1 20G224 darwin-x64
        • Chrome (web)               • chrome                               • web-javascript • Google Chrome 93.0.4577.63
    
    ! Doctor found issues in 1 category.
    [✓] Flutter (Channel master, 2.6.0-12.0.pre.624, on macOS 11.6.1 20G224 darwin-x64, locale en-US)
        • Flutter version 2.6.0-12.0.pre.624 at /Users/flo/fvm/versions/master
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 0b0b21ecb5 (22 hours ago), 2021-11-07 01:37:35 -0700
        • Engine revision 5140e30cec
        • Dart version 2.15.0 (build 2.15.0-268.0.dev)
    
    [!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at /Users/flo/Library/Android/sdk
        • Platform android-31, build-tools 31.0.0
        • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
        ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
    
    [✓] Xcode - develop for iOS and macOS (Xcode 13.0)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • CocoaPods version 1.11.0
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2020.3)
        • 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 11.0.10+0-b96-7281165)
    
    [✓] VS Code (version 1.60.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.27.0
    
    [✓] Connected device (4 available)
        • sdk gphone x86 (mobile)    • emulator-5554                        • android-x86    • Android 11 (API 30) (emulator)
        • iPhone (mobile)            • 2cb2f234cda6637b9ad960bd3eae4f38fb3a5896 • ios            • iOS 15.0.2 19A404
        • iPhone 12 Pro Max (mobile) • 98CBBFB1-4069-4A28-B7F7-138911ACBE72 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
        • macOS (desktop)            • macos                                • darwin-x64     • macOS 11.6.1 20G224 darwin-x64
        • Chrome (web)               • chrome                               • web-javascript • Google Chrome 93.0.4577.63
    
    ! Doctor found issues in 1 category.

    Thank you

  2. added
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    a: fidelityMatching the OEM platforms better
    platform-iosiOS applications specifically
    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
    and removed
    in triagePresently being triaged by the triage team
    on Nov 8, 2021
  3. goderbauer commented on Nov 10, 2021

    @goderbauer
    Member

    /cc @chunhtai

    Looks like we may not be piping the semantics index to the right place?

  4. added
    P2Important issues not at the top of the work list
    on Feb 16, 2022
  5. hoschiho commented on Oct 18, 2023

    @hoschiho

    I have a similar issue, that the ScreenReader doesn't announce the ScrollStateChanges in a CustomScrollView. I'm expecting it to announce something like: "showing items 1 to 10 of 23", but it doesn't announce anything:

    RPReplay_Final1696930986.MP4

    The feature is described in detail here in the section 'Accessibility': https://api.flutter.dev/flutter/widgets/CustomScrollView-class.html

  6. chingjun commented on Feb 1, 2024

    @chingjun
    Contributor

    Internal: b/323414019

  7. akaegi commented on May 13, 2025

    @akaegi

    Any news on this issue? Since this is an expected behavior for iOS VoiceOver users, it would be great if Flutter lists supported this.

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)a: fidelityMatching the OEM platforms betterf: scrollingViewports, list views, slivers, etc.found in release: 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6frameworkflutter/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