diff --git a/ElementX/Sources/Other/AccessibilityIdentifiers.swift b/ElementX/Sources/Other/AccessibilityIdentifiers.swift index 402174550..062a1a2ac 100644 --- a/ElementX/Sources/Other/AccessibilityIdentifiers.swift +++ b/ElementX/Sources/Other/AccessibilityIdentifiers.swift @@ -157,8 +157,6 @@ enum A11yIdentifiers { let attachmentPickerTextFormatting = "room-attachment_picker_text_formatting" let timelineItemActionMenu = "room-timeline_item_action_menu" let joinCall = "room-join_call" - let startVoiceCall = "room-start_voice_call" - let startVideoCall = "room-start_video_call" let scrollToBottom = "room-scroll_to_bottom" let messageComposer = "room-message_composer" diff --git a/ElementX/Sources/Screens/RoomScreen/View/RoomCallControlsToolbar.swift b/ElementX/Sources/Screens/RoomScreen/View/RoomCallControlsToolbar.swift index f972d3756..d4aa91bd8 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/RoomCallControlsToolbar.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/RoomCallControlsToolbar.swift @@ -25,26 +25,21 @@ struct RoomCallControlsToolbar: ToolbarContent { if viewState.isDirectOneToOneRoom { ToolbarItem(placement: .primaryAction) { Menu { - Button(action: { onCallTap(true) }) { - Label("Audio call", systemImage: "phone.fill") + Button { + onCallTap(true) + } label: { + Label(L10n.a11yStartVoiceCall, icon: \.voiceCallSolid) } - .accessibilityIdentifier(A11yIdentifiers.roomScreen.startVoiceCall) - .disabled(!viewState.canJoinCall) - - Button(action: { onCallTap(false) }) { - Label("Video call", systemImage: "video.fill") + + Button { + onCallTap(false) + } label: { + Label(L10n.a11yStartVideoCall, icon: \.videoCallSolid) } - .accessibilityIdentifier(A11yIdentifiers.roomScreen.startVideoCall) - .disabled(!viewState.canJoinCall) } label: { CompoundIcon(\.voiceCallSolid) - .frame(width: 28, height: 28) - .contentShape(Rectangle()) } - .menuIndicator(.hidden) - .buttonStyle(.plain) - .accessibilityLabel(L10n.a11yStartVoiceCall) - .accessibilityIdentifier(A11yIdentifiers.roomScreen.startVoiceCall) + .accessibilityLabel(L10n.a11yStartCall) .disabled(!viewState.canJoinCall) } } else { @@ -53,7 +48,6 @@ struct RoomCallControlsToolbar: ToolbarContent { CompoundIcon(\.videoCallSolid) } .accessibilityLabel(L10n.a11yStartVideoCall) - .accessibilityIdentifier(A11yIdentifiers.roomScreen.startVideoCall) .disabled(!viewState.canJoinCall) } }