Skip to content

SliverAppBar with actions navigates in an unexpected order when using VoiceOver #64922

@mehmetf

Description

@mehmetf

b/166068876

There is a similar b/162037818 which works as expected after fixing. I observe that when we add actions for the SliverAppBar which are on the right side of the title, the traversal order is unexpected.

(See internal bug for a video link that shows a demo)

Expected results:

Swiping to right (0-8s).

Navigation order: title -> Button -> Expanded title -> Text 0 to 3

Swiping to left (9-20s).

Navigation order: Text 3 to 0 -> Expanded title -> Button -> title

Actual results:

Swiping to right (0-8s).

Navigation order: title -> Expanded title -> Text 0 to 3

(The same as expected result.)

Swiping to left (9-20s).

Navigation order: Text 3 to 0 -> Button -> Expanded title -> Button -> title

(Should not navigate to Button before Expanded title.)

import 'package:flutter/material.dart';

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

class Demo extends StatelessWidget {
    @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: CustomScrollView(
          slivers: [
            SliverAppBar(
              pinned: true,
              expandedHeight: 200,
              title: const Text('Title'),
              actions: [IconButton(icon: Icon(Icons.more_horiz))],
              flexibleSpace: FlexibleSpaceBar(
                background: Padding(
                  padding: EdgeInsets.only(top: 100),
                  child: Semantics(
                    header: true,
                    child: const Text('Expanded title'),
                  ),
                ),
              ),
            ),
            SliverList(
              delegate: SliverChildListDelegate(
                [
                  for (var i = 0; i < 50; i++)
                    Container(
                      height: 200,
                      child: Center(child: Text('Text $i')),
                    ),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}

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 onplatform-iosiOS applications specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions