Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class EmojiCollectionViewCell: UICollectionViewCell {
emojiLabel.baselineAdjustment = .alignCenters
emojiLabel.font = UIFont.systemFont(ofSize: 32)
emojiLabel.backgroundColor = UIColor.white
emojiLabel.isAccessibilityElement = true
return emojiLabel
}()

Expand All @@ -44,8 +45,10 @@ final class EmojiCollectionViewCell: UICollectionViewCell {
guard let url = url else { return }
ImageManager.loadImage(with: url, into: emojiImageView)
emojiImageView.isHidden = false
emojiImageView.isAccessibilityElement = true
case .standard(let string):
emojiLabel.text = string
emojiImageView.accessibilityLabel = string
emojiLabel.isHidden = false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,15 @@ final class EmojiPicker: UIView, RCEmojiKitLocalizable {
skinToneButton.layer.cornerRadius = skinToneButton.frame.width/2
skinToneButton.backgroundColor = currentSkinTone.color
skinToneButton.showsTouchWhenHighlighted = true
skinToneButton.accessibilityLabel = localized("skinTone.label")
}
}

@IBAction func didPressSkinToneButton(_ sender: UIButton) {
currentSkinToneIndex += 1
currentSkinToneIndex = currentSkinToneIndex % skinTones.count
skinToneButton.backgroundColor = currentSkinTone.color
skinToneButton.accessibilityHint = currentSkinTone.name
emojisCollectionView.reloadData()
}

Expand Down Expand Up @@ -180,6 +182,8 @@ final class EmojiPicker: UIView, RCEmojiKitLocalizable {
let categoryItems = currentCategories.map { category -> UITabBarItem in
let image = UIImage(named: category.name) ?? UIImage(named: "custom")
let item = UITabBarItem(title: nil, image: image, selectedImage: image)
item.isAccessibilityElement = true
item.accessibilityLabel = category.name
item.imageInsets = UIEdgeInsets(top: 6, left: 0, bottom: -6, right: 0)
return item
}
Expand Down Expand Up @@ -230,6 +234,8 @@ extension EmojiPicker: UICollectionViewDataSource {

if let file = emoji.imageUrl {
cell.emoji = .custom(URL(string: file))
cell.emojiImageView.accessibilityLabel = emoji.name
cell.emojiImageView.accessibilityTraits = .staticText
} else {
var toneModifier = ""
if emoji.supportsTones, let currentTone = currentSkinTone.name { toneModifier = "_\(currentTone)" }
Expand Down
4 changes: 4 additions & 0 deletions Rocket.Chat/External/RCEmojiKit/cs.lproj/RCEmojiKit.strings
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
"categories.flags" = "FLAGS"; //TODO

"reactorlist.title" = "Reactions"; //TODO

// Accessibility

"skinTone.label" = "Change skintone"; //TODO
4 changes: 4 additions & 0 deletions Rocket.Chat/External/RCEmojiKit/de.lproj/RCEmojiKit.strings
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
"categories.flags" = "FLAGGEN";

"reactorlist.title" = "Reaktionen";

// Accessibility

"skinTone.label" = "Change skintone"; //TODO
3 changes: 3 additions & 0 deletions Rocket.Chat/External/RCEmojiKit/el.lproj/RCEmojiKit.strings
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@

"reactorlist.title" = "Αντιδράσεις";

// Accessibility

"skinTone.label" = "Change skintone"; //TODO
3 changes: 3 additions & 0 deletions Rocket.Chat/External/RCEmojiKit/en.lproj/RCEmojiKit.strings
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@

"reactorlist.title" = "Reactions";

// Accessibility

"skinTone.label" = "Change skintone";
3 changes: 3 additions & 0 deletions Rocket.Chat/External/RCEmojiKit/es.lproj/RCEmojiKit.strings
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@

"reactorlist.title" = "Reactions";

// Accessibility

"skinTone.label" = "Change skintone"; //TODO
3 changes: 3 additions & 0 deletions Rocket.Chat/External/RCEmojiKit/it.lproj/RCEmojiKit.strings
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@

"reactorlist.title" = "Reazioni";

// Accessibility

"skinTone.label" = "Change skintone"; //TODO
3 changes: 3 additions & 0 deletions Rocket.Chat/External/RCEmojiKit/ja.lproj/RCEmojiKit.strings
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@

"reactorlist.title" = "Reactions";

// Accessibility

"skinTone.label" = "Change skintone"; //TODO
4 changes: 4 additions & 0 deletions Rocket.Chat/External/RCEmojiKit/pl.lproj/RCEmojiKit.strings
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
"categories.flags" = "FLAGI";

"reactorlist.title" = "Reakcje";

// Accessibility

"skinTone.label" = "Change skintone"; //TODO
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
"categories.flags" = "BANDEIRAS";

"reactorlist.title" = "Reações";

// Accessibility

"skinTone.label" = "Change skintone"; //TODO
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@

"reactorlist.title" = "Reactions";

// Accessibility

"skinTone.label" = "Change skintone"; //TODO
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@

"reactorlist.title" = "Reactions";

// Accessibility

"skinTone.label" = "Change skintone"; //TODO