diff --git a/View Controllers/EditAttachmentViewController.swift b/View Controllers/EditAttachmentViewController.swift index 9d888bc..fd35e72 100644 --- a/View Controllers/EditAttachmentViewController.swift +++ b/View Controllers/EditAttachmentViewController.swift @@ -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() diff --git a/Views/UIKit/AttachmentView.swift b/Views/UIKit/AttachmentView.swift index 2dafe3c..6da67f2 100644 --- a/Views/UIKit/AttachmentView.swift +++ b/Views/UIKit/AttachmentView.swift @@ -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