From 8e920eeb1e57f44533b730b410e338c26de17484 Mon Sep 17 00:00:00 2001 From: harperl-lgtm Date: Wed, 7 Dec 2022 18:49:23 -0500 Subject: [PATCH] Added label for progress indicator without percentage value --- lib/codeviewer/code_segments.dart | 19 ++++++++++++++++--- .../material/progress_indicator_demo.dart | 4 +++- lib/l10n/intl_en.arb | 4 ++++ lib/l10n/intl_en_US.xml | 4 ++++ 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/codeviewer/code_segments.dart b/lib/codeviewer/code_segments.dart index da1cd44bcb..bb2f7bc806 100644 --- a/lib/codeviewer/code_segments.dart +++ b/lib/codeviewer/code_segments.dart @@ -35607,10 +35607,23 @@ class CodeSegments { TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.punctuationStyle, text: '['), TextSpan(style: codeStyle.baseStyle, text: '\u000a '), - TextSpan(style: codeStyle.keywordStyle, text: 'const'), - TextSpan(style: codeStyle.baseStyle, text: ' '), TextSpan(style: codeStyle.classStyle, text: 'CircularProgressIndicator'), - TextSpan(style: codeStyle.punctuationStyle, text: '(),'), + TextSpan(style: codeStyle.punctuationStyle, text: '('), + TextSpan( + style: codeStyle.baseStyle, + text: '\u000a semanticsLabel'), + TextSpan(style: codeStyle.punctuationStyle, text: ':'), + TextSpan(style: codeStyle.baseStyle, text: ' '), + TextSpan(style: codeStyle.classStyle, text: 'GalleryLocalizations'), + TextSpan(style: codeStyle.punctuationStyle, text: '.'), + TextSpan(style: codeStyle.baseStyle, text: 'of'), + TextSpan(style: codeStyle.punctuationStyle, text: '('), + TextSpan(style: codeStyle.baseStyle, text: 'context'), + TextSpan(style: codeStyle.punctuationStyle, text: ')!.'), + TextSpan(style: codeStyle.baseStyle, text: 'loading'), + TextSpan(style: codeStyle.punctuationStyle, text: ','), + TextSpan(style: codeStyle.baseStyle, text: '\u000a '), + TextSpan(style: codeStyle.punctuationStyle, text: '),'), TextSpan(style: codeStyle.baseStyle, text: '\u000a '), TextSpan(style: codeStyle.keywordStyle, text: 'const'), TextSpan(style: codeStyle.baseStyle, text: ' '), diff --git a/lib/demos/material/progress_indicator_demo.dart b/lib/demos/material/progress_indicator_demo.dart index 7588c5c5bb..6d8d5c86a9 100644 --- a/lib/demos/material/progress_indicator_demo.dart +++ b/lib/demos/material/progress_indicator_demo.dart @@ -66,7 +66,9 @@ class _ProgressIndicatorDemoState extends State case ProgressIndicatorDemoType.circular: return Column( children: [ - const CircularProgressIndicator(), + CircularProgressIndicator( + semanticsLabel: GalleryLocalizations.of(context)!.loading, + ), const SizedBox(height: 32), CircularProgressIndicator(value: _animation.value), ], diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index ed86c68c48..707fb86246 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -2234,6 +2234,10 @@ "@demo": { "description": "Used in the title of the demos." }, + "loading": "Loading", + "@loading": { + "description": "Indicates the loading process." + }, "dialogDiscardTitle": "Discard draft?", "@dialogDiscardTitle": { "description": "Alert dialog message to discard draft." diff --git a/lib/l10n/intl_en_US.xml b/lib/l10n/intl_en_US.xml index dd9d120080..e53925d376 100644 --- a/lib/l10n/intl_en_US.xml +++ b/lib/l10n/intl_en_US.xml @@ -2101,6 +2101,10 @@ name="demo" description="Used in the title of the demos." >Demo + Loading