a11y: add profile picture accessibility label

This commit is contained in:
Mauro Romito
2025-03-27 16:34:33 +01:00
committed by Mauro
parent 96abaf7226
commit a4eeb66527
4 changed files with 6 additions and 0 deletions
@@ -1,4 +1,5 @@
"Notification" = "Notification";
"a11y_avatar" = "Avatar";
"a11y_delete" = "Delete";
"a11y_hide_password" = "Hide password";
"a11y_join_call" = "Join call";
@@ -1,4 +1,5 @@
"Notification" = "Notification";
"a11y_avatar" = "Avatar";
"a11y_delete" = "Delete";
"a11y_hide_password" = "Hide password";
"a11y_join_call" = "Join call";
+2
View File
@@ -10,6 +10,8 @@ import Foundation
// swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
internal enum L10n {
/// Avatar
internal static var a11yAvatar: String { return L10n.tr("Localizable", "a11y_avatar") }
/// Delete
internal static var a11yDelete: String { return L10n.tr("Localizable", "a11y_delete") }
/// Plural format key: "%#@COUNT@"
@@ -143,6 +143,7 @@ struct AvatarHeaderView<Footer: View>: View {
avatarSize: avatarSize,
mediaProvider: mediaProvider,
onAvatarTap: onAvatarTap)
.accessibilityLabel(L10n.a11yAvatar)
case .user(let userProfile):
LoadableAvatarImage(url: userProfile.avatarURL,
@@ -151,6 +152,7 @@ struct AvatarHeaderView<Footer: View>: View {
avatarSize: avatarSize,
mediaProvider: mediaProvider,
onTap: onAvatarTap)
.accessibilityLabel(L10n.a11yAvatar)
}
}