From cc8f233b54e0345ab5f8487af9d96a00d8a0844c Mon Sep 17 00:00:00 2001 From: guidezpl Date: Fri, 31 Jan 2020 15:46:21 +0100 Subject: [PATCH 1/3] Enable a11y carousel scrolling --- gallery/gallery/lib/pages/home.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/gallery/gallery/lib/pages/home.dart b/gallery/gallery/lib/pages/home.dart index 7b65f8838b5..8ba1372aed4 100644 --- a/gallery/gallery/lib/pages/home.dart +++ b/gallery/gallery/lib/pages/home.dart @@ -700,6 +700,7 @@ class _CarouselState extends State<_Carousel> controller: _controller, itemCount: widget.children.length, itemBuilder: (context, index) => builder(index), + allowImplicitScrolling: true, ), controller: widget.animationController, ); From 2c48ff031505274152b56902e72fb7a2c3ffb7a2 Mon Sep 17 00:00:00 2001 From: guidezpl Date: Fri, 31 Jan 2020 15:46:49 +0100 Subject: [PATCH 2/3] Fix slow motion announcement on android talkback --- .../gallery/lib/pages/settings_list_item.dart | 69 ++++++++++--------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/gallery/gallery/lib/pages/settings_list_item.dart b/gallery/gallery/lib/pages/settings_list_item.dart index 04cc2c7b97d..da94545603c 100644 --- a/gallery/gallery/lib/pages/settings_list_item.dart +++ b/gallery/gallery/lib/pages/settings_list_item.dart @@ -26,44 +26,47 @@ class SlowMotionSetting extends StatelessWidget { final textTheme = Theme.of(context).textTheme; final options = GalleryOptions.of(context); - return Container( - margin: settingItemHeaderMargin, - child: Material( - shape: RoundedRectangleBorder(borderRadius: settingItemBorderRadius), - color: colorScheme.secondary, - clipBehavior: Clip.antiAlias, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Padding( - padding: EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - GalleryLocalizations.of(context).settingsSlowMotion, - style: textTheme.subhead.apply( - color: colorScheme.onSurface, + return Semantics( + container: true, + child: Container( + margin: settingItemHeaderMargin, + child: Material( + shape: RoundedRectangleBorder(borderRadius: settingItemBorderRadius), + color: colorScheme.secondary, + clipBehavior: Clip.antiAlias, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + GalleryLocalizations.of(context).settingsSlowMotion, + style: textTheme.subhead.apply( + color: colorScheme.onSurface, + ), ), - ), - ], + ], + ), ), ), - ), - Padding( - padding: const EdgeInsetsDirectional.only(end: 8), - child: Switch( - activeColor: colorScheme.primary, - value: options.timeDilation != 1.0, - onChanged: (isOn) => GalleryOptions.update( - context, - options.copyWith(timeDilation: isOn ? 5.0 : 1.0), + Padding( + padding: const EdgeInsetsDirectional.only(end: 8), + child: Switch( + activeColor: colorScheme.primary, + value: options.timeDilation != 1.0, + onChanged: (isOn) => GalleryOptions.update( + context, + options.copyWith(timeDilation: isOn ? 5.0 : 1.0), + ), ), ), - ), - ], + ], + ), ), ), ); From 0973a3c5f3e1cb9c03d7b10e163affdda6a52bb8 Mon Sep 17 00:00:00 2001 From: guidezpl Date: Fri, 31 Jan 2020 16:43:31 +0100 Subject: [PATCH 3/3] Revert "Enable a11y carousel scrolling" This reverts commit cc8f233b54e0345ab5f8487af9d96a00d8a0844c. --- gallery/gallery/lib/pages/home.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/gallery/gallery/lib/pages/home.dart b/gallery/gallery/lib/pages/home.dart index 8ba1372aed4..7b65f8838b5 100644 --- a/gallery/gallery/lib/pages/home.dart +++ b/gallery/gallery/lib/pages/home.dart @@ -700,7 +700,6 @@ class _CarouselState extends State<_Carousel> controller: _controller, itemCount: widget.children.length, itemBuilder: (context, index) => builder(index), - allowImplicitScrolling: true, ), controller: widget.animationController, );