From 6f78a89a610335542efca015db8bd4624cfff429 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 13 Jan 2022 18:25:10 -0800 Subject: [PATCH] Photo search: Add image, download button semantics (#989) Adds the Unsplash photo description, if available, as the image semantics label in the photo detail view. Adds a 'download' tooltip to the download IconButton, which also sets the semantics label for screen readers. --- .../desktop_photo_search/lib/src/widgets/photo_details.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/experimental/desktop_photo_search/lib/src/widgets/photo_details.dart b/experimental/desktop_photo_search/lib/src/widgets/photo_details.dart index 7c20ceb64..866a652a9 100644 --- a/experimental/desktop_photo_search/lib/src/widgets/photo_details.dart +++ b/experimental/desktop_photo_search/lib/src/widgets/photo_details.dart @@ -78,6 +78,7 @@ class _PhotoDetailsState extends State { ), child: FadeInImage.memoryNetwork( placeholder: kTransparentImage, + imageSemanticLabel: widget.photo.description, image: widget.photo.urls!.small!, ), ), @@ -94,6 +95,7 @@ class _PhotoDetailsState extends State { _buildPhotoAttribution(context), const SizedBox(width: 8), IconButton( + tooltip: 'Download', visualDensity: VisualDensity.compact, icon: const Icon(Icons.cloud_download), onPressed: () => widget.onPhotoSave(widget.photo),