diff --git a/packages/flutter/lib/src/material/dialog.dart b/packages/flutter/lib/src/material/dialog.dart index 09ac978cef..e8049dfdba 100644 --- a/packages/flutter/lib/src/material/dialog.dart +++ b/packages/flutter/lib/src/material/dialog.dart @@ -812,7 +812,6 @@ class AlertDialog extends StatelessWidget { style: contentTextStyle ?? dialogTheme.contentTextStyle ?? defaults.contentTextStyle!, child: Semantics( container: true, - explicitChildNodes: true, child: content, ), ), diff --git a/packages/flutter/test/material/dialog_test.dart b/packages/flutter/test/material/dialog_test.dart index ebc1af01fc..9415e58aae 100644 --- a/packages/flutter/test/material/dialog_test.dart +++ b/packages/flutter/test/material/dialog_test.dart @@ -1700,12 +1700,7 @@ void main() { theme: ThemeData(platform: TargetPlatform.iOS), home: const AlertDialog( title: Text('title'), - content: Column( - children: [ - Text('some content'), - Text('more content'), - ], - ), + content: Text('content'), actions: [ TextButton(onPressed: null, child: Text('action')) ], ), ), @@ -1736,21 +1731,11 @@ void main() { // node 4. TestSemantics( id: 6, - children: [ - TestSemantics( - id: 7, - label: 'some content', - textDirection: TextDirection.ltr, - ), - TestSemantics( - id: 8, - label: 'more content', - textDirection: TextDirection.ltr, - ), - ], + label: 'content', + textDirection: TextDirection.ltr, ), TestSemantics( - id: 9, + id: 7, flags: [ SemanticsFlag.isButton, SemanticsFlag.hasEnabledState,