Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small Accesibility Tweaks #674

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't drop this because I'm not sure of the implications since it's been translated a bunch

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they aren't used, they should be deleted including the translations imo. Would need a code owner to make the final verdict.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If its unused and not expected to be used again we should remove it, but it doesn't have to be in this PR necessarily.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Drop voteToggle unused string resource

<string name="upvote">Upvote</string>
<string name="downvote">Downvote</string>
<string name="upvoted">Upvoted</string>
<string name="downvoted">Downvoted</string>
</resources>