Skip to content

Commit

Permalink
Accessibility: VoiceOver: Add accessibility label and hint to the Rec…
Browse files Browse the repository at this point in the history
…ord Voice Message button. (#6323)

* Add accessibility label and hint to the Record Voice Message button.

* Add release note.

* Remove unnecessary import for SwiftUI.

* Update Riot/Modules/Room/VoiceMessages/VoiceMessageToolbarView.swift

Use VectorL10n instead of calling NSLocalizedString directly.

* Add German translation for the newly added a11y strings.

* Revert "Add German translation for the newly added a11y strings."

This reverts commit 003cfd9.

* Update Riot/Assets/en.lproj/Vector.strings
  • Loading branch information
robin24 committed Jun 22, 2022
1 parent 2d1f6f8 commit 67291f8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ Tap the + to start adding people.";
"room_accessibility_threads" = "Threads";
"room_accessibility_hangup" = "Hang up";
"room_accessibility_thread_more" = "More";
"room_accessibility_record_voice_message" = "Record Voice Message";
"room_accessibility_record_voice_message_hint" = "Double-tap and hold to record.";
"room_place_voice_call" = "Voice call";
"room_open_dialpad" = "Dial pad";
"room_join_group_call" = "Join";
Expand Down
8 changes: 8 additions & 0 deletions Riot/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4451,6 +4451,14 @@ public class VectorL10n: NSObject {
public static var roomAccessibilityIntegrations: String {
return VectorL10n.tr("Vector", "room_accessibility_integrations")
}
/// Record Voice Message
public static var roomAccessibilityRecordVoiceMessage: String {
return VectorL10n.tr("Vector", "room_accessibility_record_voice_message")
}
/// Double-tap and hold to record.
public static var roomAccessibilityRecordVoiceMessageHint: String {
return VectorL10n.tr("Vector", "room_accessibility_record_voice_message_hint")
}
/// Search
public static var roomAccessibilitySearch: String {
return VectorL10n.tr("Vector", "room_accessibility_search")
Expand Down
2 changes: 2 additions & 0 deletions Riot/Modules/Room/VoiceMessages/VoiceMessageToolbarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ class VoiceMessageToolbarView: PassthroughView, NibLoadable, Themable, UIGesture
playbackView.waveformView.addGestureRecognizer(tapGesture)
tapGesture.delegate = self
self.tapGesture = tapGesture
primaryRecordButton.accessibilityLabel = VectorL10n.roomAccessibilityRecordVoiceMessage
primaryRecordButton.accessibilityHint = VectorL10n.roomAccessibilityRecordVoiceMessageHint

updateUIWithDetails(VoiceMessageToolbarViewDetails(), animated: false)
}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-6323.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Accessibility: VoiceOver: Added an accessibility label and hint to the Record Voice Message button.

0 comments on commit 67291f8

Please sign in to comment.