Reactions: Add content descriptions to emoji chooser category tabs and individual emojis

Signed-off-by: Peter Vágner <pvdeejay@gmail.com>
This commit is contained in:
Peter Vágner 2019-07-01 13:30:26 +02:00 committed by Peter Vágner
parent 2f6d3adb17
commit 73dd735ba6
2 changed files with 6 additions and 2 deletions

View file

@ -92,7 +92,10 @@ class EmojiReactionPickerActivity : VectorBaseActivity(), EmojiCompatFontProvide
it.rawData?.categories?.let { categories ->
for (category in categories) {
val s = category.emojis[0]
tabLayout.addTab(tabLayout.newTab().setText(it.rawData!!.emojis[s]!!.emojiString()))
val newTab =tabLayout.newTab()
newTab.setText(it.rawData!!.emojis[s]!!.emojiString())
newTab.setContentDescription(category.name)
tabLayout.addTab(newTab)
}
tabLayout.addOnTabSelectedListener(tabLayoutSelectionListener)
}

View file

@ -258,6 +258,7 @@ class EmojiRecyclerAdapter(val dataSource: EmojiDataSource? = null, var reaction
emojiView.emoji = s
if (s != null) {
emojiView.mLayout = getStaticLayoutForEmoji(s)
emojiView.setContentDescription(s)
placeHolder.visibility = View.GONE
// emojiView.visibility = View.VISIBLE
} else {