added accessibility labels for call screen controls FREEBIE

Added Prefix

combined similar labels to CALL_VIEW_MUTE_LABEL
This commit is contained in:
Daniel 2017-10-16 13:03:43 +02:00 committed by Michael Kirk
parent 1a9186410e
commit e8f92ede60
2 changed files with 39 additions and 0 deletions

View File

@ -338,16 +338,30 @@ class CallViewController: OWSViewController, CallObserver, CallServiceObserver {
// action:#selector(didPressTextMessage))
audioSourceButton = createButton(imageName:"audio-call-speaker-inactive",
action:#selector(didPressAudioSource))
audioSourceButton.accessibilityLabel = NSLocalizedString("CALL_VIEW_AUDIO_SOURCE_LABEL",
comment: "Accessibility label for selection the audio source")
hangUpButton = createButton(imageName:"hangup-active-wide",
action:#selector(didPressHangup))
hangUpButton.accessibilityLabel = NSLocalizedString("CALL_VIEW_HANGUP_LABEL",
comment: "Accessibility label for hang up call")
audioModeMuteButton = createButton(imageName:"audio-call-mute-inactive",
action:#selector(didPressMute))
audioModeMuteButton.accessibilityLabel = NSLocalizedString("CALL_VIEW_MUTE_LABEL",
comment: "Accessibility label for muting the microphone")
videoModeMuteButton = createButton(imageName:"video-mute-unselected",
action:#selector(didPressMute))
videoModeMuteButton.accessibilityLabel = NSLocalizedString("CALL_VIEW_MUTE_LABEL", comment: "Accessibility label for muting the microphone")
audioModeVideoButton = createButton(imageName:"audio-call-video-inactive",
action:#selector(didPressVideo))
audioModeVideoButton.accessibilityLabel = NSLocalizedString("CALL_VIEW_SWITCH_TO_VIDEO_LABEL", comment: "Accessibility label to switch to video call")
videoModeVideoButton = createButton(imageName:"video-video-unselected",
action:#selector(didPressVideo))
videoModeVideoButton.accessibilityLabel = NSLocalizedString("CALL_VIEW_SWITCH_TO_AUDIO_LABEL", comment: "Accessibility label to switch to audio only")
setButtonSelectedImage(button: audioModeMuteButton, imageName: "audio-call-mute-active")
setButtonSelectedImage(button: videoModeMuteButton, imageName: "video-mute-selected")
@ -416,8 +430,12 @@ class CallViewController: OWSViewController, CallObserver, CallServiceObserver {
acceptIncomingButton = createButton(imageName:"call-active-wide",
action:#selector(didPressAnswerCall))
acceptIncomingButton.accessibilityLabel = NSLocalizedString("CALL_VIEW_ACCEPT_INCOMING_CALL_LABEL",
comment: "Accessibility label for accepting incoming calls")
declineIncomingButton = createButton(imageName:"hangup-active-wide",
action:#selector(didPressDeclineCall))
declineIncomingButton.accessibilityLabel = NSLocalizedString("CALL_VIEW_DECLINE_INCOMING_CALL_LABEL",
comment: "Accessibility label for declining incoming calls")
incomingCallView = createContainerForCallControls(controlGroups : [
[acceptIncomingButton, declineIncomingButton ]

View File

@ -226,6 +226,18 @@
/* Title for alert offering to call a user. */
"CALL_USER_ALERT_TITLE" = "Call?";
/* Accessibility label for accepting incoming calls */
"CALL_VIEW_ACCEPT_INCOMING_CALL_LABEL" = "Accept incoming call";
/* Accessibility label for selection the audio source */
"CALL_VIEW_AUDIO_SOURCE_LABEL" = "Audio";
/* Accessibility label for declining incoming calls */
"CALL_VIEW_DECLINE_INCOMING_CALL_LABEL" = "Decline incoming call";
/* Accessibility label for hang up call */
"CALL_VIEW_HANGUP_LABEL" = "End call";
/* Reminder to the user of the benefits of enabling CallKit and disabling CallKit privacy. */
"CALL_VIEW_SETTINGS_NAG_DESCRIPTION_ALL" = "You can answer calls directly from your lock screen and see the name and phone number for incoming calls if you change your settings.\n\nSee the privacy settings for details.";
@ -238,6 +250,15 @@
/* Label for button that shows the privacy settings. */
"CALL_VIEW_SETTINGS_NAG_SHOW_CALL_SETTINGS" = "Show Privacy Settings";
/* Accessibility label to switch to audio only */
"CALL_VIEW_SWITCH_TO_AUDIO_LABEL" = "Switch to audio call";
/* Accessibility label to switch to video call */
"CALL_VIEW_SWITCH_TO_VIDEO_LABEL" = "Switch to video call";
/* Accessibility label for muting the microphone */
"CALL_VIEW_MUTE_LABEL" = "Mute";
/* notification action */
"CALLBACK_BUTTON_TITLE" = "Call Back";