Skip to content

Commit 08ef009

Browse files
committed
🐛 Fix close button semantics
1 parent 4b0380e commit 08ef009

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

lib/src/delegates/asset_picker_builder_delegate.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,11 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
570570
padding: const EdgeInsets.symmetric(vertical: 4),
571571
child: IconButton(
572572
onPressed: Navigator.of(context).maybePop,
573-
tooltip: MaterialLocalizations.of(context).backButtonTooltip,
574-
icon: const Icon(Icons.close),
573+
tooltip: MaterialLocalizations.of(context).closeButtonTooltip,
574+
icon: Icon(
575+
Icons.close,
576+
semanticLabel: MaterialLocalizations.of(context).closeButtonTooltip,
577+
),
575578
),
576579
);
577580
}

lib/src/delegates/asset_picker_viewer_builder_delegate.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,9 +702,12 @@ class DefaultAssetPickerViewerBuilderDelegate
702702
leading: Semantics(
703703
sortKey: ordinalSortKey(0),
704704
child: IconButton(
705-
tooltip: MaterialLocalizations.of(context).backButtonTooltip,
706705
onPressed: Navigator.of(context).maybePop,
707-
icon: const Icon(Icons.close),
706+
tooltip: MaterialLocalizations.of(context).closeButtonTooltip,
707+
icon: Icon(
708+
Icons.close,
709+
semanticLabel: MaterialLocalizations.of(context).closeButtonTooltip,
710+
),
708711
),
709712
),
710713
centerTitle: true,

0 commit comments

Comments
 (0)