Skip to content

[Accessibility] Accessibility skips or resets focus talkback in scrollable Column or ListView (Testing in Android) #173080

@rod-moraes

Description

@rod-moraes

Steps to reproduce

Create a scrollable widget (e.g., SingleChildScrollView or ListView) containing a Column.

Add multiple children (e.g., Texts, Buttons) inside the Column.

Enable TalkBack on an Android device.

Try navigating through the screen using TalkBack gestures.

Expected results

TalkBack should move focus linearly through each accessible item in order,, without skipping or looping.

Actual results

TalkBack skips some items inside the scrollable widget.

In some cases, it jumps back to the top instead of progressing.

This happens more often when nesting widgets within the Column.

Code sample

Code sample
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: _AnimationBackground(
          body: Semantics(
            explicitChildNodes: true,
            child: Column(
              mainAxisSize: MainAxisSize.min,
              children: <Widget>[
                ...List.generate(
                  100,
                  (index) => IndexedSemantics(
                    index: index,
                    child: Container(
                      padding: const EdgeInsets.all(80),
                      color: Colors.red,
                      child: Text('teste $index'),
                    ),
                  ),
                ),
              ],
            ),
          ),
        ),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

class _AnimationBackground extends StatelessWidget {
  final Widget body;
  const _AnimationBackground({required this.body});

  @override
  Widget build(BuildContext context) {
    return ScrollConfiguration(
      behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false),
      child: ListView(children: [body]),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.32.5, on macOS 26.0 25A5316i darwin-arm64, locale pt-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.3)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)f: scrollingViewports, list views, slivers, etc.found in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-androidOwned by Android platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions