mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-24 22:40:28 +00:00
Improve attachment upload accessibility labels
This commit is contained in:
parent
a4d2e89296
commit
20bbf5e5df
2 changed files with 6 additions and 1 deletions
|
@ -98,6 +98,7 @@ final class EditAttachmentViewController: UIViewController {
|
|||
textView.layer.cornerRadius = .defaultCornerRadius
|
||||
textView.delegate = self
|
||||
textView.text = viewModel.editingDescription
|
||||
textView.accessibilityLabel = describeLabel.text
|
||||
|
||||
let remainingCharactersLabel = UILabel()
|
||||
|
||||
|
|
|
@ -135,7 +135,6 @@ private extension AttachmentView {
|
|||
addSubview(selectionButton)
|
||||
selectionButton.translatesAutoresizingMaskIntoConstraints = false
|
||||
selectionButton.setBackgroundImage(.highlightedButtonBackground, for: .highlighted)
|
||||
selectionButton.accessibilityLabel = NSLocalizedString("compose.attachment.edit", comment: "")
|
||||
selectionButton.addAction(
|
||||
UIAction { [weak self] _ in
|
||||
guard let self = self else { return }
|
||||
|
@ -143,6 +142,11 @@ private extension AttachmentView {
|
|||
self.parentViewModel.attachmentSelected(viewModel: self.viewModel)
|
||||
},
|
||||
for: .touchUpInside)
|
||||
selectionButton.accessibilityLabel = NSLocalizedString("compose.attachment.edit", comment: "")
|
||||
|
||||
if let description = viewModel.attachment.description, !description.isEmpty {
|
||||
selectionButton.accessibilityLabel?.appendWithSeparator(description)
|
||||
}
|
||||
|
||||
addSubview(removeButton)
|
||||
removeButton.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
|
Loading…
Reference in a new issue