add accessibility to send button and voice message button
This commit is contained in:
parent
d6d041a74f
commit
d60475be99
|
@ -22,11 +22,17 @@ final class InputView : UIView, InputViewButtonDelegate, InputTextViewDelegate,
|
|||
// MARK: UI Components
|
||||
private lazy var attachmentsButton = ExpandingAttachmentsButton(delegate: delegate)
|
||||
|
||||
private lazy var voiceMessageButton = InputViewButton(icon: #imageLiteral(resourceName: "Microphone"), delegate: self)
|
||||
private lazy var voiceMessageButton: InputViewButton = {
|
||||
let result = InputViewButton(icon: #imageLiteral(resourceName: "Microphone"), delegate: self)
|
||||
result.accessibilityLabel = NSLocalizedString("VOICE_MESSAGE_TOO_SHORT_ALERT_TITLE", comment: "")
|
||||
result.accessibilityHint = NSLocalizedString("VOICE_MESSAGE_TOO_SHORT_ALERT_MESSAGE", comment: "")
|
||||
return result
|
||||
}()
|
||||
|
||||
private lazy var sendButton: InputViewButton = {
|
||||
let result = InputViewButton(icon: #imageLiteral(resourceName: "ArrowUp"), isSendButton: true, delegate: self)
|
||||
result.isHidden = true
|
||||
result.accessibilityLabel = NSLocalizedString("ATTACHMENT_APPROVAL_SEND_BUTTON", comment: "")
|
||||
return result
|
||||
}()
|
||||
private lazy var voiceMessageButtonContainer = container(for: voiceMessageButton)
|
||||
|
|
|
@ -25,6 +25,7 @@ final class InputViewButton : UIView {
|
|||
self.hasOpaqueBackground = hasOpaqueBackground
|
||||
super.init(frame: CGRect.zero)
|
||||
setUpViewHierarchy()
|
||||
self.isAccessibilityElement = true
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
|
|
Loading…
Reference in New Issue