Skip to content

Commit

Permalink
Small Accessibility Tweaks, fixes #616 (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmmjackson authored Jun 16, 2023
1 parent 40c70e4 commit 2c35ab1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
15 changes: 14 additions & 1 deletion app/src/main/java/com/jerboa/ui/components/common/VoteHelpers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,24 @@ fun <T> 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,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fun CommunityLink(
if (showDefaultIcon) {
Icon(
imageVector = Icons.Outlined.Forum,
contentDescription = "TODO",
contentDescription = "",
modifier = Modifier.size(size),
)
}
Expand Down
14 changes: 9 additions & 5 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<string name="create_report_report">Report</string>
<string name="create_report_type_your_reason">Type your reason</string>
<string name="create_report_view_model_report_created">Report Created</string>
<string name="dialog_moreOptions">Show more options</string>
<string name="dialog_moreOptions">More options</string>
<string name="dialogs_active">Active</string>
<string name="dialogs_all">All</string>
<string name="dialogs_done">Done</string>
Expand All @@ -139,7 +139,7 @@
<string name="dialogs_unread">Unread</string>
<string name="floating_createPost">Create post</string>
<string name="form_submit">Submit</string>
<string name="homeHeader_filter">Select listing filter</string>
<string name="homeHeader_filter">Select feed</string>
<string name="home_add_account">Add Account</string>
<string name="home_all">All</string>
<string name="home_communities">Communities</string>
Expand All @@ -157,7 +157,7 @@
<string name="home_subscriptions">Subscriptions</string>
<string name="home_switch_to">Switch to %1$s/%2$s</string>
<string name="inbox_back">Back</string>
<string name="inbox_filter">Select inbox filter</string>
<string name="inbox_filter">Filter</string>
<string name="inbox_inbox">Inbox</string>
<string name="inbox_markAllRead">Mark all as read</string>
<string name="input_fields_cancel">Cancel</string>
Expand Down Expand Up @@ -207,7 +207,7 @@
<string name="markdownHelper_insertList">Insert list</string>
<string name="markdownHelper_insertQuote">Insert quote</string>
<string name="markdownHelper_preview">View preview</string>
<string name="moreOptions">Show more options</string>
<string name="moreOptions">More options</string>
<string name="personProfile_viewAvatar">View avatar image</string>
<string name="personProfile_viewBanner">View banner image</string>
<string name="person_iconAdmin">Is administrator</string>
Expand Down Expand Up @@ -256,7 +256,7 @@
<string name="private_message_reply_type_your_message_placeholder">Type your message</string>
<string name="private_message_to">"to "</string>
<string name="removeBookmark">Remove from bookmarks</string>
<string name="selectSort">Select sort option</string>
<string name="selectSort">Sort by</string>
<string name="settings_about_about">About</string>
<string name="settings_about_developer_matrix_chatroom">Developer Matrix chatroom</string>
<string name="settings_about_donate_to_jerboa_development">Donate to Jerboa development</string>
Expand Down Expand Up @@ -289,4 +289,8 @@
<string name="topAppBar_back">Back</string>
<string name="utils_login_first">Login first</string>
<string name="voteToggle">Toggle vote</string>
<string name="upvote">Upvote</string>
<string name="downvote">Downvote</string>
<string name="upvoted">Upvoted</string>
<string name="downvoted">Downvoted</string>
</resources>

0 comments on commit 2c35ab1

Please sign in to comment.