From 73dd735ba611b8be685ea56e593692a9f1d248bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20V=C3=A1gner?= Date: Mon, 1 Jul 2019 13:30:26 +0200 Subject: [PATCH] Reactions: Add content descriptions to emoji chooser category tabs and individual emojis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Vágner --- .../riotx/features/reactions/EmojiReactionPickerActivity.kt | 5 ++++- .../vector/riotx/features/reactions/EmojiRecyclerAdapter.kt | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/reactions/EmojiReactionPickerActivity.kt b/vector/src/main/java/im/vector/riotx/features/reactions/EmojiReactionPickerActivity.kt index d8d0fb04da..c9bddbbe72 100644 --- a/vector/src/main/java/im/vector/riotx/features/reactions/EmojiReactionPickerActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/reactions/EmojiReactionPickerActivity.kt @@ -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) } diff --git a/vector/src/main/java/im/vector/riotx/features/reactions/EmojiRecyclerAdapter.kt b/vector/src/main/java/im/vector/riotx/features/reactions/EmojiRecyclerAdapter.kt index a8a7be6f15..cbdbcc11d2 100644 --- a/vector/src/main/java/im/vector/riotx/features/reactions/EmojiRecyclerAdapter.kt +++ b/vector/src/main/java/im/vector/riotx/features/reactions/EmojiRecyclerAdapter.kt @@ -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 { @@ -361,4 +362,4 @@ class EmojiRecyclerAdapter(val dataSource: EmojiDataSource? = null, var reaction } } } -} \ No newline at end of file +}