Open vsomayaji opened 2 years ago
Hi @vsomayaji. This issue is reproducible on the stable
channel.
But it seems to have been fixed on master
channel: 3.1.0-0.0.pre.1647
. Please watch the recorded video below.
Please try the issue again on the latest master channel and confirm if this issue is fixed.
Note: the screen reader hasn't read autofocus
TextButton (Page 2 (autofocus)) as it used to in the stable
channel. (1)
If you confirm this issue has been fixed and find the same behavior as me at (1), you can update this issue or open new issue for this.
Thanks!
@huycozy thanks for the quick response! I confirmed that I no longer see the lost semantics in the master
channel (3.1.0-0.0.pre.1654
); however, you're right: in that channel the widget with autofocus: true
is not automatically read by the screen reader on load. My guess is that when that regression is fixed, we'll see the lost semantics on Safari again. 😁
Steps to Reproduce
flutter run -d chrome
on the code sample.Expected results:
The semantics of the Page 2 button and the Check me checkbox should be preserved and the screen reader should be able to interact with the elements.
Actual results:
The semantics are lost and the screen reader reads the elements as groups (see the attached video). Setting
autofocus: false
on the first button resolves this issue.Code sample
```dart import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; void main() { WidgetsFlutterBinding.ensureInitialized(); // Auto-enable accessibility for our Blind and Low Vision customers (see // https://docs.flutter.dev/development/accessibility-and-localization/accessibility#screen-readers). RendererBinding.instance.setSemanticsEnabled(true); runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( title: 'Safari A11y Issue', initialRoute: Page1.routeName, routes: { Page1.routeName: (_) => const Page1(), Page2.routeName: (_) => const Page2(), }, ); } } class Page1 extends StatefulWidget { const Page1({Key? key}) : super(key: key); static const String routeName = '/page1'; @override StateLogs
``` [✓] Flutter (Channel stable, 3.0.4, on macOS 12.4 21F79 darwin-x64, locale en-US) • Flutter version 3.0.4 at /Users/vsomayaji/Dev/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 85684f9300 (13 days ago), 2022-06-30 13:22:47 -0700 • Engine revision 6ba2af10bb • Dart version 2.17.5 • DevTools version 2.12.2 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/vsomayaji/Library/Android/sdk • Platform android-31, build-tools 30.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.1) • 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.11+0-b60-7590822) [✓] IntelliJ IDEA Ultimate Edition (version 2021.1.2) • IntelliJ at /Applications/IntelliJ IDEA.app • 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 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-x64 • macOS 12.4 21F79 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found! ```https://user-images.githubusercontent.com/1007109/178851506-8ff2b13d-2675-4708-b58c-4f393d73739f.mov