From 67bd8a3f1c8e23e44cc9005d246ab5ee8b4d83ec Mon Sep 17 00:00:00 2001
From: rami-a <2364772+rami-a@users.noreply.github.com>
Date: Mon, 16 Dec 2019 12:27:21 -0500
Subject: [PATCH] Update semantic label of study back button (#188)
---
gallery/gallery/lib/l10n/gallery_localizations.dart | 8 ++++++++
gallery/gallery/lib/l10n/intl_en_US.arb | 4 ++++
gallery/gallery/lib/l10n/intl_en_US.xml | 4 ++++
gallery/gallery/lib/l10n/messages_en_US.dart | 2 ++
gallery/gallery/lib/pages/home.dart | 11 +++++++----
5 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/gallery/gallery/lib/l10n/gallery_localizations.dart b/gallery/gallery/lib/l10n/gallery_localizations.dart
index 31c398679..fe68b86e6 100644
--- a/gallery/gallery/lib/l10n/gallery_localizations.dart
+++ b/gallery/gallery/lib/l10n/gallery_localizations.dart
@@ -229,6 +229,14 @@ class GalleryLocalizations {
desc: r'Represents a link to the Flutter samples github repository.');
}
+ String get backToGallery {
+ return Intl.message(r'Back to Gallery',
+ locale: _localeName,
+ name: 'backToGallery',
+ desc:
+ r'Semantic label for back button to exit a study and return to the gallery.');
+ }
+
String get bottomNavigationAccountTab {
return Intl.message(r'Account',
locale: _localeName,
diff --git a/gallery/gallery/lib/l10n/intl_en_US.arb b/gallery/gallery/lib/l10n/intl_en_US.arb
index 730a6fad7..dc4cfb288 100644
--- a/gallery/gallery/lib/l10n/intl_en_US.arb
+++ b/gallery/gallery/lib/l10n/intl_en_US.arb
@@ -13,6 +13,10 @@
}
}
},
+ "backToGallery": "Back to Gallery",
+ "@backToGallery": {
+ "description": "Semantic label for back button to exit a study and return to the gallery home page."
+ },
"homeHeaderGallery": "Gallery",
"@homeHeaderGallery": {
"description": "Header title on home screen for Gallery section."
diff --git a/gallery/gallery/lib/l10n/intl_en_US.xml b/gallery/gallery/lib/l10n/intl_en_US.xml
index e95e92214..074bcf2f0 100644
--- a/gallery/gallery/lib/l10n/intl_en_US.xml
+++ b/gallery/gallery/lib/l10n/intl_en_US.xml
@@ -13,6 +13,10 @@
name="aboutDialogDescription"
description="A description about how to view the source code for this app."
>To see the source code for this app, please visit the {value}.
+ Back to Gallery
{
),
Align(
alignment: AlignmentDirectional.bottomStart,
- child: Semantics(
- sortKey: const OrdinalSortKey(0),
- child: Padding(
- padding: const EdgeInsets.all(16),
+ child: Padding(
+ padding: const EdgeInsets.all(16),
+ child: Semantics(
+ sortKey: const OrdinalSortKey(0),
+ label: GalleryLocalizations.of(context).backToGallery,
+ button: true,
+ excludeSemantics: true,
child: FloatingActionButton.extended(
focusNode: backButtonFocusNode,
onPressed: () {