Skip to content

Commit

Permalink
Merge pull request nextcloud#14322 from nextcloud/fix/noid/a11yConten…
Browse files Browse the repository at this point in the history
…tDescription

Add content description
  • Loading branch information
tobiasKaminsky authored Jan 7, 2025
2 parents 57c02dc + 38f1ebd commit 429198e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -600,10 +600,12 @@ private void setFileModificationTimestamp(OCFile file, boolean showDetailedTimes
private void setFavoriteIconStatus(boolean isFavorite) {
if (isFavorite) {
binding.favorite.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_star, null));
binding.favorite.setContentDescription(getString(R.string.unset_favorite));
} else {
binding.favorite.setImageDrawable(ResourcesCompat.getDrawable(getResources(),
R.drawable.ic_star_outline,
null));
binding.favorite.setContentDescription(getString(R.string.favorite));
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/file_details_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/zero"
android:layout_marginEnd="@dimen/standard_eighth_margin"
android:contentDescription="@null"
android:contentDescription="@string/favorite"
android:src="@drawable/ic_star_outline" />

<TextView
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/file_details_sharing_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@
android:layout_width="@dimen/minimum_size_for_touchable_area"
android:layout_height="@dimen/minimum_size_for_touchable_area"
android:layout_gravity="center_vertical"
android:padding="12dp"
android:layout_marginEnd="@dimen/standard_quarter_margin"
android:contentDescription="@string/pick_contact_to_share_with"
android:padding="12dp"
android:src="@drawable/ic_contact_book" />

</LinearLayout>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1296,4 +1296,5 @@
<string name="warn_rename_extension">Changing the extension might cause this file to open in a different application</string>
<string name="auto_upload_gplay">Auto upload behaviour changed</string>
<string name="auto_upload_gplay_desc">Due to new restrictions imposed by Google, the auto upload feature will no longer be able to automatically remove uploaded files.</string>
<string name="pick_contact_to_share_with">Pick contact to share with</string>
</resources>

0 comments on commit 429198e

Please sign in to comment.