From cb35a1c72828ebb2560611ab18b0bb63d1f87760 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 13 Jul 2017 09:50:37 -0700 Subject: [PATCH] Tiny a11y fix for Gallery (#11187) --- .../flutter_gallery/lib/gallery/item.dart | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/examples/flutter_gallery/lib/gallery/item.dart b/examples/flutter_gallery/lib/gallery/item.dart index dafa548b4c..afc2c5b3a6 100644 --- a/examples/flutter_gallery/lib/gallery/item.dart +++ b/examples/flutter_gallery/lib/gallery/item.dart @@ -31,18 +31,20 @@ class GalleryItem extends StatelessWidget { @override Widget build(BuildContext context) { - return new ListTile( - title: new Text(title), - subtitle: new Text(subtitle), - onTap: () { - if (routeName != null) { - Timeline.instantSync('Start Transition', arguments: { - 'from': '/', - 'to': routeName - }); - Navigator.pushNamed(context, routeName); + return new MergeSemantics( + child: new ListTile( + title: new Text(title), + subtitle: new Text(subtitle), + onTap: () { + if (routeName != null) { + Timeline.instantSync('Start Transition', arguments: { + 'from': '/', + 'to': routeName + }); + Navigator.pushNamed(context, routeName); + } } - } + ), ); } }