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 -> it.rawData?.categories?.let { categories ->
for (category in categories) { for (category in categories) {
val s = category.emojis[0] 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) tabLayout.addOnTabSelectedListener(tabLayoutSelectionListener)
} }

View File

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