Skip to content

Commit

Permalink
add accessibility label for •••
Browse files Browse the repository at this point in the history
we use "•••" to indicate "other" reactions visually,
however, when visually impaired, eg. screen readers won't have a clue.

therefore, set accessibilityLabel to "Other".

for the other reactions, things might be good enough,
at least, voice over has a chance to read this out in its meaning.
if we get concrete feedback, we'll try to improve.
  • Loading branch information
r10s committed Apr 6, 2024
1 parent 71a4a27 commit 1d8deb5
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1948,25 +1948,25 @@ extension ChatViewController {
})
}

menuElements.append(
UIAction(title: "•••") { [weak self] _ in
guard let self else { return }
reactionMessageId = self.messageIds[indexPath.row]
let action = UIAction(title: "•••") { [weak self] _ in
guard let self else { return }
reactionMessageId = self.messageIds[indexPath.row]

let pickerViewController = MCEmojiPickerViewController()
pickerViewController.navigationItem.title = String.localized("react")
pickerViewController.delegate = self
let pickerViewController = MCEmojiPickerViewController()
pickerViewController.navigationItem.title = String.localized("react")
pickerViewController.delegate = self

let navigationController = UINavigationController(rootViewController: pickerViewController)
if #available(iOS 15.0, *) {
if let sheet = navigationController.sheetPresentationController {
sheet.detents = [.medium(), .large()]
sheet.preferredCornerRadius = 20
}
let navigationController = UINavigationController(rootViewController: pickerViewController)
if #available(iOS 15.0, *) {
if let sheet = navigationController.sheetPresentationController {
sheet.detents = [.medium(), .large()]
sheet.preferredCornerRadius = 20
}
present(navigationController, animated: true)
}
)
present(navigationController, animated: true)
}
action.accessibilityLabel = String.localized("pref_other")
menuElements.append(action)
}

// context menu for iOS 13+
Expand Down

0 comments on commit 1d8deb5

Please sign in to comment.