From db6ed2e9107eece16d8a8489e2dc0e3e6aaf47f3 Mon Sep 17 00:00:00 2001 From: Mauro Romito <mauro.romito@element.io> Date: Thu, 27 Mar 2025 16:49:59 +0100 Subject: [PATCH] a11y: accessibility labels for calls --- .../Resources/Localizations/en-US.lproj/Localizable.strings | 2 ++ ElementX/Resources/Localizations/en.lproj/Localizable.strings | 2 ++ ElementX/Sources/Generated/Strings.swift | 4 ++++ ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift | 2 ++ 4 files changed, 10 insertions(+) diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index 8a1267bbc..2e971b752 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -1,6 +1,7 @@ "Notification" = "Notification"; "a11y_delete" = "Delete"; "a11y_hide_password" = "Hide password"; +"a11y_join_call" = "Join call"; "a11y_jump_to_bottom" = "Jump to bottom"; "a11y_notifications_mentions_only" = "Mentions only"; "a11y_notifications_muted" = "Muted"; @@ -9,6 +10,7 @@ "a11y_pin_field" = "PIN field"; "a11y_play" = "Play"; "a11y_poll_end" = "Ended poll"; +"a11y_profile_picture" = "Profile picture"; "a11y_react_with" = "React with %1$@"; "a11y_react_with_other_emojis" = "React with other emojis"; "a11y_read_receipts_multiple" = "Read by %1$@ and %2$@"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 7299adf4d..3751f2f0f 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -1,6 +1,7 @@ "Notification" = "Notification"; "a11y_delete" = "Delete"; "a11y_hide_password" = "Hide password"; +"a11y_join_call" = "Join call"; "a11y_jump_to_bottom" = "Jump to bottom"; "a11y_notifications_mentions_only" = "Mentions only"; "a11y_notifications_muted" = "Muted"; @@ -9,6 +10,7 @@ "a11y_pin_field" = "PIN field"; "a11y_play" = "Play"; "a11y_poll_end" = "Ended poll"; +"a11y_profile_picture" = "Profile picture"; "a11y_react_with" = "React with %1$@"; "a11y_react_with_other_emojis" = "React with other emojis"; "a11y_read_receipts_multiple" = "Read by %1$@ and %2$@"; diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index 465d74965..3ae7c5a7d 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -18,6 +18,8 @@ internal enum L10n { } /// Hide password internal static var a11yHidePassword: String { return L10n.tr("Localizable", "a11y_hide_password") } + /// Join call + internal static var a11yJoinCall: String { return L10n.tr("Localizable", "a11y_join_call") } /// Jump to bottom internal static var a11yJumpToBottom: String { return L10n.tr("Localizable", "a11y_jump_to_bottom") } /// Mentions only @@ -38,6 +40,8 @@ internal enum L10n { internal static var a11yPoll: String { return L10n.tr("Localizable", "a11y_poll") } /// Ended poll internal static var a11yPollEnd: String { return L10n.tr("Localizable", "a11y_poll_end") } + /// Profile picture + internal static var a11yProfilePicture: String { return L10n.tr("Localizable", "a11y_profile_picture") } /// React with %1$@ internal static func a11yReactWith(_ p1: Any) -> String { return L10n.tr("Localizable", "a11y_react_with", String(describing: p1)) diff --git a/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift b/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift index 7ebcc7f4f..4b7659849 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift @@ -233,6 +233,7 @@ struct RoomScreen: View { .labelStyle(.titleAndIcon) } .buttonStyle(ElementCallButtonStyle()) + .accessibilityLabel(L10n.a11yJoinCall) .accessibilityIdentifier(A11yIdentifiers.roomScreen.joinCall) } else { Button { @@ -240,6 +241,7 @@ struct RoomScreen: View { } label: { CompoundIcon(\.videoCallSolid) } + .accessibilityLabel(L10n.a11yStartCall) .accessibilityIdentifier(A11yIdentifiers.roomScreen.joinCall) } } -- GitLab