Skip to content

[iOS a11y] voiceover does not focus hidden children correctly in a scroll view #80991

Closed
flutter/engine
#25738
@chunhtai

Description

@chunhtai

b/184482502

import 'package:flutter/material.dart';
void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {

    return MaterialApp(
        title: 'Default label',
        home: Scaffold(
          appBar: AppBar(
            title: const Text('Test'),
          ),
          body: SingleChildScrollView(
            child: Column(
              children: [
                SizedBox.fromSize(
                  size: const Size(100, 400),
                  child: const Text('text'),
                ),
                SizedBox.fromSize(
                  size: const Size(100, 400),
                  child: const Text('text'),
                ),
                Container(
                  height: 100,
                  child: Align(
                    alignment: Alignment.centerRight,
                    child: ListView.separated(
                      padding: const EdgeInsets.symmetric(horizontal: 16),
                      scrollDirection: Axis.horizontal,
                      shrinkWrap: true,
                      itemCount: 1,
                      separatorBuilder: (_, __) =>
                          SizedBox(width: 8.0),
                      itemBuilder: (context, index) {
                        return Center(
                          child: RaisedButton(
                            onPressed: () {},
                            child: const Text('button'),
                          ),
                        );
                      },
                    ),
                  ),
                ),
              ],
            ),
          ),
        )
    );
  }
}
  1. turn on voice over.
  2. swipe right three times to focus the button.

expect: the button receive focus and announce the label
actual: the parent rect of the button gets focused and the voiceover does not announce any label

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressiona: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)customer: money (g3)engineflutter/engine repository. See also e: labels.platform-iosiOS applications specificallywaiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions