mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
a11y: add profile picture accessibility label
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
"Notification" = "Notification";
|
"Notification" = "Notification";
|
||||||
|
"a11y_avatar" = "Avatar";
|
||||||
"a11y_delete" = "Delete";
|
"a11y_delete" = "Delete";
|
||||||
"a11y_hide_password" = "Hide password";
|
"a11y_hide_password" = "Hide password";
|
||||||
"a11y_join_call" = "Join call";
|
"a11y_join_call" = "Join call";
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
"Notification" = "Notification";
|
"Notification" = "Notification";
|
||||||
|
"a11y_avatar" = "Avatar";
|
||||||
"a11y_delete" = "Delete";
|
"a11y_delete" = "Delete";
|
||||||
"a11y_hide_password" = "Hide password";
|
"a11y_hide_password" = "Hide password";
|
||||||
"a11y_join_call" = "Join call";
|
"a11y_join_call" = "Join call";
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import Foundation
|
|||||||
// swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length
|
// swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length
|
||||||
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
|
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
|
||||||
internal enum L10n {
|
internal enum L10n {
|
||||||
|
/// Avatar
|
||||||
|
internal static var a11yAvatar: String { return L10n.tr("Localizable", "a11y_avatar") }
|
||||||
/// Delete
|
/// Delete
|
||||||
internal static var a11yDelete: String { return L10n.tr("Localizable", "a11y_delete") }
|
internal static var a11yDelete: String { return L10n.tr("Localizable", "a11y_delete") }
|
||||||
/// Plural format key: "%#@COUNT@"
|
/// Plural format key: "%#@COUNT@"
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ struct AvatarHeaderView<Footer: View>: View {
|
|||||||
avatarSize: avatarSize,
|
avatarSize: avatarSize,
|
||||||
mediaProvider: mediaProvider,
|
mediaProvider: mediaProvider,
|
||||||
onAvatarTap: onAvatarTap)
|
onAvatarTap: onAvatarTap)
|
||||||
|
.accessibilityLabel(L10n.a11yAvatar)
|
||||||
|
|
||||||
case .user(let userProfile):
|
case .user(let userProfile):
|
||||||
LoadableAvatarImage(url: userProfile.avatarURL,
|
LoadableAvatarImage(url: userProfile.avatarURL,
|
||||||
@@ -151,6 +152,7 @@ struct AvatarHeaderView<Footer: View>: View {
|
|||||||
avatarSize: avatarSize,
|
avatarSize: avatarSize,
|
||||||
mediaProvider: mediaProvider,
|
mediaProvider: mediaProvider,
|
||||||
onTap: onAvatarTap)
|
onTap: onAvatarTap)
|
||||||
|
.accessibilityLabel(L10n.a11yAvatar)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user