Skip to content

[TalkBack][SliverAppBar] Contents of FlexibleSpace can not be tap-navigated with explore by touch. #69145

@johnsonmh

Description

@johnsonmh

Internal: b/171671470

Widgets in a SliverAppBar.flexibleSpace can not be navigated to with explore by touch on Android. There seems to be another semantics node taking higher priority.

It's possible that is related to #65049.

Steps to Reproduce

  1. Run the following app on and Android device.
  2. Enable TalkBack.
  3. Tap on one of the "Text" widgets in the list, notice how it gets focus.
  4. Try tapping on the text in the header ("In Talkback, on Android, I can be swiped to...").
  5. Notice that tapping on the text does not cause TalkBack to focus on it.

You can still swipe left and right to navigate to the text on top, but tapping it does nothing.

import 'package:flutter/material.dart';

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

class Demo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SliverAppBarPage(),
      ),
    );
  }
}

class SliverAppBarPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return CustomScrollView(
      slivers: [
        SliverAppBar(
          automaticallyImplyLeading: false,
          pinned: true,
          expandedHeight: 200,
          flexibleSpace: Padding(
            padding: EdgeInsets.all(40),
            child: Text(
              'In TalkBack, on Android, I can be swiped to, but not '
              'tapped on (explore by touch).',
            ),
          ),
        ),
        SliverList(
          delegate: SliverChildListDelegate([
            for (var i = 0; i < 20; i++)
              Container(
                height: 50,
                child: Center(child: Text('Text')),
              ),
          ]),
        ),
      ],
    );
  }
}

Expected results:
Expected focus to move to text in flexibleSpace.

Screenshot_20201027-180429

Actual results:
Instead, text remained on previously focused node:
Screenshot_20201027-180453

Flutter Doctor
[✓] Flutter (Channel master, 1.24.0-4.0.pre.102, on Mac OS X 10.15.5 19F101 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Android Studio (version 3.5)
[✓] Connected device (4 available)

• No issues found!

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressiona: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)customer: money (g3)f: material designflutter/packages/flutter/material repository.found in release: 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions