You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the provided code sample in Chrome flutter run -d chrome on MacOS.
Enable VoiceOver on MacOS with Command + F5.
On Chrome, enable the semantics tree using Control + Option + Left Arrow followed by Control + Option + Space. Then step into the Flutter content by pressing Control + Option + Shift + Arrow Down.
Navigate to the TextField by pressing Control + Option + Right Arrow a couple of times.
This only happens if a Theme exists with an extension:
TextField should be focused, and typing text should fill up the TextField.
Actual results
TextField is focused, but typing doesn't fill the TextField.
Code sample
Code sample
import'package:flutter/material.dart';
voidmain() =>runApp(constMyApp());
classMyAppextendsStatefulWidget {
constMyApp({super.key});
@overrideState<MyApp> createState() =>_MyAppState();
}
class_MyAppStateextendsState<MyApp> {
@overrideWidgetbuild(BuildContext context) {
returnMaterialApp(
title:'VoiceOver Bug Demo',
theme:ThemeData(
colorScheme:ColorScheme.fromSeed(seedColor:Colors.deepPurple),
useMaterial3:true,
),
builder: (context, child) {
// Simulating the structure from simpleclub app:// Material -> Overlay -> OverlayEntry -> AsyncThemeWrapper -> childreturnMaterial(
child:Overlay(
initialEntries: [
OverlayEntry(
builder: (context) {
returnTheme(
data:Theme.of(context).copyWith(
extensions: [ProductColorExtension(color:Colors.purple)],
),
child: child!,
);
},
),
],
),
);
},
home:ContentPage(),
);
}
}
/// Simple theme extension to simulate ProductColorThemeExtensionclassProductColorExtensionextendsThemeExtension<ProductColorExtension> {
constProductColorExtension({requiredthis.color});
finalColor color;
@overrideProductColorExtensioncopyWith({Color? color}) {
returnProductColorExtension(color: color ??this.color);
}
@overrideProductColorExtensionlerp(ProductColorExtension? other, double t) {
if (other is!ProductColorExtension) returnthis;
returnProductColorExtension(
color:Color.lerp(color, other.color, t) ?? color,
);
}
}
classContentPageextendsStatelessWidget {
constContentPage({super.key});
@overrideWidgetbuild(BuildContext context) {
returnScaffold(
appBar:AppBar(
backgroundColor:Colors.red.shade100,
title:Text(
'With Theme extension (BROKEN!)',
style:TextStyle(
fontWeight:FontWeight.bold,
color:Colors.red.shade900,
),
),
),
body:CustomScrollView(
slivers: [
SliverToBoxAdapter(
child:Padding(
padding:constEdgeInsets.all(24.0),
child:Column(
crossAxisAlignment:CrossAxisAlignment.start,
children: [
constText(
'This text should be readable by VoiceOver. ''If you cannot hear this text when navigating with VoiceOver, ''the bug is present.',
style:TextStyle(fontSize:16),
),
constSizedBox(height:16),
TextField(
decoration:InputDecoration(
hintText:'This text field should be accessible...',
border:OutlineInputBorder(
borderRadius:BorderRadius.circular(12),
),
),
),
],
),
),
),
],
),
);
}
}
Screenshots or Video
Screenshots / Video demonstrationbug.mp4
Logs
Logs
fvm flutter run -d chromeResolving dependencies... Downloading packages... characters 1.4.0 (1.4.1 available) matcher 0.12.17 (0.12.18 available) material_color_utilities 0.11.1 (0.13.0 available) meta 1.17.0 (1.18.1 available) test_api 0.7.7 (0.7.9 available)Got dependencies!5 packages have newer versions incompatible with dependency constraints.Try `flutter pub outdated` for more information.Launching lib/main.dart on Chrome in debug mode...Waiting for connection from debug service on Chrome... ⣽^ 5.3sFlutter run key commands.r Hot reload. 🔥🔥🔥R Hot restart.h List all available interactive commands.d Detach (terminate "flutter run" but leave application running).c Clear the screenq Quit (terminate the application on the device).This app is linked to the debug service: ws://127.0.0.1:62250/LJs_TsYvXUM=/wsDebug service listening on ws://127.0.0.1:62250/LJs_TsYvXUM=/wsA Dart VM Service on Chrome is available at: http://127.0.0.1:62250/LJs_TsYvXUM=The Flutter DevTools debugger and profiler on Chrome is available at:http://127.0.0.1:62250/LJs_TsYvXUM=/devtools/?uri=ws://127.0.0.1:62250/LJs_TsYvXUM=/wsStarting application from main method in: org-dartlang-app:/web_entrypoint.dart.
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):[✓] Flutter (Channel stable, 3.38.4, on macOS 15.6.1 24G90 darwin-arm64, locale en-US)[!] Android toolchain - develop for Android devices (Android SDK version 35.0.1) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses[✓] Xcode - develop for iOS and macOS (Xcode 16.4)[✓] Chrome - develop for the web[✓] Connected device (3 available) ! Error: Browsing on the local area network for iPhone 13 von Manu. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) ! Error: Browsing on the local area network for iPad von Manuela. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27)[✓] Network resources! Doctor found issues in 1 category.
Steps to reproduce
Run the provided code sample in Chrome
flutter run -d chromeon MacOS.Enable VoiceOver on MacOS with Command + F5.
On Chrome, enable the semantics tree using Control + Option + Left Arrow followed by Control + Option + Space. Then step into the Flutter content by pressing Control + Option + Shift + Arrow Down.
Navigate to the TextField by pressing Control + Option + Right Arrow a couple of times.
This only happens if a
Themeexists with an extension:Expected results
TextField should be focused, and typing text should fill up the TextField.
Actual results
TextField is focused, but typing doesn't fill the TextField.
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
bug.mp4
Logs
Logs
Flutter Doctor output
Doctor output