From 727a8cd7152a04568b81dc4e438ecc9f4534d688 Mon Sep 17 00:00:00 2001 From: Ben Basten <45583362+ben-basten@users.noreply.github.com> Date: Tue, 12 Mar 2024 15:12:11 +0000 Subject: [PATCH] feat(mobile): add labels to app bar buttons (#7865) --- mobile/lib/modules/album/views/library_page.dart | 3 ++- mobile/lib/modules/album/views/sharing_page.dart | 3 ++- mobile/lib/shared/ui/immich_app_bar.dart | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mobile/lib/modules/album/views/library_page.dart b/mobile/lib/modules/album/views/library_page.dart index 4a0f57ab59..b8b1b6b392 100644 --- a/mobile/lib/modules/album/views/library_page.dart +++ b/mobile/lib/modules/album/views/library_page.dart @@ -194,9 +194,10 @@ class LibraryPage extends HookConsumerWidget { ? InkWell( onTap: () => context.pushRoute(const TrashRoute()), borderRadius: const BorderRadius.all(Radius.circular(12)), - child: const Icon( + child: Icon( Icons.delete_rounded, size: 25, + semanticLabel: 'profile_drawer_trash'.tr(), ), ) : null; diff --git a/mobile/lib/modules/album/views/sharing_page.dart b/mobile/lib/modules/album/views/sharing_page.dart index e6b2ade6bc..44a7faee46 100644 --- a/mobile/lib/modules/album/views/sharing_page.dart +++ b/mobile/lib/modules/album/views/sharing_page.dart @@ -212,9 +212,10 @@ class SharingPage extends HookConsumerWidget { return InkWell( onTap: () => context.pushRoute(const PartnerRoute()), borderRadius: const BorderRadius.all(Radius.circular(12)), - child: const Icon( + child: Icon( Icons.swap_horizontal_circle_rounded, size: 25, + semanticLabel: 'partner_page_title'.tr(), ), ); } diff --git a/mobile/lib/shared/ui/immich_app_bar.dart b/mobile/lib/shared/ui/immich_app_bar.dart index 0c70e52353..35b4822757 100644 --- a/mobile/lib/shared/ui/immich_app_bar.dart +++ b/mobile/lib/shared/ui/immich_app_bar.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; @@ -80,6 +81,7 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget { strokeWidth: 2, strokeCap: StrokeCap.round, valueColor: AlwaysStoppedAnimation(iconColor), + semanticsLabel: 'backup_controller_page_backup'.tr(), ), ); } else if (backupState.backupProgress != @@ -89,6 +91,7 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget { Icons.check_outlined, size: 9, color: iconColor, + semanticLabel: 'backup_controller_page_backup'.tr(), ); } } @@ -98,6 +101,7 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget { Icons.cloud_off_rounded, size: 9, color: iconColor, + semanticLabel: 'backup_controller_page_backup'.tr(), ); } }