diff --git a/CHANGES.md b/CHANGES.md index 318f1ca068..af3d3bf129 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,7 +10,7 @@ Improvements: - Remove any notification of a redacted event (#563) Other changes: - - + - Fix a few accessibility issues Bugfix: - Fix characters erased from the Search field when the result are coming (#545) diff --git a/vector/src/main/java/im/vector/riotx/features/media/ImageContentRenderer.kt b/vector/src/main/java/im/vector/riotx/features/media/ImageContentRenderer.kt index 299f0af470..55e7891f3c 100644 --- a/vector/src/main/java/im/vector/riotx/features/media/ImageContentRenderer.kt +++ b/vector/src/main/java/im/vector/riotx/features/media/ImageContentRenderer.kt @@ -68,6 +68,8 @@ class ImageContentRenderer @Inject constructor(private val activeSessionHolder: val (width, height) = processSize(data, mode) imageView.layoutParams.height = height imageView.layoutParams.width = width + // a11y + imageView.contentDescription = data.filename createGlideRequest(data, mode, imageView, width, height) .dontAnimate() @@ -80,6 +82,9 @@ class ImageContentRenderer @Inject constructor(private val activeSessionHolder: fun renderFitTarget(data: Data, mode: Mode, imageView: ImageView, callback: ((Boolean) -> Unit)? = null) { val (width, height) = processSize(data, mode) + // a11y + imageView.contentDescription = data.filename + createGlideRequest(data, mode, imageView, width, height) .listener(object : RequestListener { override fun onLoadFailed(e: GlideException?, @@ -127,6 +132,9 @@ class ImageContentRenderer @Inject constructor(private val activeSessionHolder: } fun render(data: Data, imageView: BigImageView) { + // a11y + imageView.contentDescription = data.filename + val (width, height) = processSize(data, Mode.THUMBNAIL) val contentUrlResolver = activeSessionHolder.getActiveSession().contentUrlResolver() val fullSize = contentUrlResolver.resolveFullSize(data.url) diff --git a/vector/src/main/res/layout/fragment_home_detail.xml b/vector/src/main/res/layout/fragment_home_detail.xml index 8bc0603013..bda23973ee 100644 --- a/vector/src/main/res/layout/fragment_home_detail.xml +++ b/vector/src/main/res/layout/fragment_home_detail.xml @@ -25,6 +25,7 @@ android:id="@+id/groupToolbarAvatarImageView" android:layout_width="32dp" android:layout_height="32dp" + android:contentDescription="@string/a11y_open_drawer" tools:src="@tools:sample/avatars" /> @@ -88,6 +89,7 @@ android:layout_width="0dp" android:layout_height="0dp" android:background="?android:attr/selectableItemBackground" + android:contentDescription="@string/send_attachment" android:src="@drawable/ic_attachment" android:tint="?attr/colorAccent" tools:ignore="MissingConstraints" /> @@ -107,6 +109,7 @@ android:layout_width="0dp" android:layout_height="0dp" android:background="?android:attr/selectableItemBackground" + android:contentDescription="@string/send" android:src="@drawable/ic_send" android:tint="?attr/colorAccent" tools:ignore="MissingConstraints" /> diff --git a/vector/src/main/res/layout/motion_fab_menu_merge.xml b/vector/src/main/res/layout/motion_fab_menu_merge.xml index a7f82fe4b1..967e1120f3 100644 --- a/vector/src/main/res/layout/motion_fab_menu_merge.xml +++ b/vector/src/main/res/layout/motion_fab_menu_merge.xml @@ -21,6 +21,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" + android:contentDescription="@string/a11y_create_room" android:src="@drawable/ic_fab_add_room" app:backgroundTint="#FFFFFF" app:fabCustomSize="48dp" @@ -43,6 +44,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" + android:contentDescription="@string/a11y_create_direct_message" android:src="@drawable/ic_fab_add_chat" app:backgroundTint="#FFFFFF" app:fabCustomSize="48dp" @@ -64,6 +66,7 @@ android:id="@+id/createRoomButton" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:contentDescription="@string/a11y_create_menu" android:src="@drawable/ic_fab_add" app:maxImageSize="14dp" /> diff --git a/vector/src/main/res/layout/view_keys_backup_banner.xml b/vector/src/main/res/layout/view_keys_backup_banner.xml index d073826261..87c92cf8b4 100644 --- a/vector/src/main/res/layout/view_keys_backup_banner.xml +++ b/vector/src/main/res/layout/view_keys_backup_banner.xml @@ -106,6 +106,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dp" + android:contentDescription="@string/a11y_close_keys_backup_banner" android:src="@drawable/ic_small_close" app:layout_constraintEnd_toEndOf="@id/view_keys_backup_banner_close" app:layout_constraintStart_toStartOf="@id/view_keys_backup_banner_close" diff --git a/vector/src/main/res/menu/home_bottom_navigation.xml b/vector/src/main/res/menu/home_bottom_navigation.xml index 407e57d50a..f93a018436 100644 --- a/vector/src/main/res/menu/home_bottom_navigation.xml +++ b/vector/src/main/res/menu/home_bottom_navigation.xml @@ -3,23 +3,20 @@ + android:title="@string/bottom_action_home" /> + android:title="@string/bottom_action_people_x" /> + android:title="@string/bottom_action_rooms" /> diff --git a/vector/src/main/res/values/strings_riotX.xml b/vector/src/main/res/values/strings_riotX.xml index f2ac7817be..693b6c6e52 100644 --- a/vector/src/main/res/values/strings_riotX.xml +++ b/vector/src/main/res/values/strings_riotX.xml @@ -13,4 +13,12 @@ Looks like the server is taking to long to respond, this can be caused by either poor connectivity or an error with our servers. Please try again in a while. + Send attachment + + Open the navigation drawer + Create… + Create a new direct conversation + Create a new room + Close keys backup banner + \ No newline at end of file