From 52312b0c824f2f1f3adbae517d1a72076866245d Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 15 Jun 2023 12:53:01 -0400 Subject: [PATCH] Small Accessibility Tweaks: https://github.com/dessalines/jerboa/issues/616 --- .../jerboa/ui/components/common/VoteHelpers.kt | 15 ++++++++++++++- .../ui/components/community/CommunityLink.kt | 2 +- app/src/main/res/values/strings.xml | 14 +++++++++----- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/jerboa/ui/components/common/VoteHelpers.kt b/app/src/main/java/com/jerboa/ui/components/common/VoteHelpers.kt index 3ca1d0f15..756ea349f 100644 --- a/app/src/main/java/com/jerboa/ui/components/common/VoteHelpers.kt +++ b/app/src/main/java/com/jerboa/ui/components/common/VoteHelpers.kt @@ -35,11 +35,24 @@ fun VoteGeneric( } else { null } + val contentDescription: String = if (type == VoteType.Upvote) { + if (myVote == 1) { + stringResource(R.string.upvoted) + } else { + stringResource(R.string.upvote) + } + } else { + if (myVote == 1) { + stringResource(R.string.downvoted) + } else { + stringResource(R.string.downvote) + } + } ActionBarButton( onClick = { onVoteClick(item) }, contentColor = iconAndColor.second, icon = iconAndColor.first, - contentDescription = stringResource(R.string.voteToggle), + contentDescription = contentDescription, text = votesStr, account = account, ) diff --git a/app/src/main/java/com/jerboa/ui/components/community/CommunityLink.kt b/app/src/main/java/com/jerboa/ui/components/community/CommunityLink.kt index 1fc5ec127..fb347a73d 100644 --- a/app/src/main/java/com/jerboa/ui/components/community/CommunityLink.kt +++ b/app/src/main/java/com/jerboa/ui/components/community/CommunityLink.kt @@ -88,7 +88,7 @@ fun CommunityLink( if (showDefaultIcon) { Icon( imageVector = Icons.Outlined.Forum, - contentDescription = "TODO", + contentDescription = "", modifier = Modifier.size(size), ) } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 92fbca93d..200afd3d1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -119,7 +119,7 @@ Report Type your reason Report Created - Show more options + More options Active All Done @@ -139,7 +139,7 @@ Unread Create post Submit - Select listing filter + Select feed Add Account All Communities @@ -157,7 +157,7 @@ Subscriptions Switch to %1$s/%2$s Back - Select inbox filter + Filter Inbox Mark all as read Cancel @@ -207,7 +207,7 @@ Insert list Insert quote View preview - Show more options + More options View avatar image View banner image Is administrator @@ -256,7 +256,7 @@ Type your message "to " Remove from bookmarks - Select sort option + Sort by About Developer Matrix chatroom Donate to Jerboa development @@ -289,4 +289,8 @@ Back Login first Toggle vote + Upvote + Downvote + Upvoted + Downvoted