From 8892fac062cacedc01d39f11dc98f6959cca743a Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Mon, 22 Aug 2022 14:41:48 +0200 Subject: [PATCH] Adds content description to space chevrons --- .../im/vector/app/features/spaces/NewSpaceSummaryController.kt | 3 ++- vector/src/main/res/layout/item_new_space.xml | 2 +- vector/src/main/res/layout/item_new_sub_space.xml | 2 +- vector/src/main/res/values/strings.xml | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/spaces/NewSpaceSummaryController.kt b/vector/src/main/java/im/vector/app/features/spaces/NewSpaceSummaryController.kt index 3169fefcb5..2b45db2e4e 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/NewSpaceSummaryController.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/NewSpaceSummaryController.kt @@ -135,7 +135,8 @@ class NewSpaceSummaryController @Inject constructor( val countState = UnreadCounterBadgeView.State(childSummary.notificationCount, childSummary.highlightCount > 0) val expanded = expandedStates[childSummary.roomId] == true val isSelected = childSummary.roomId == selectedSpace?.roomId - val subSpaces = childSummary.spaceChildren?.filter { childSpace -> spaceSummaries.containsSpaceId(childSpace.childRoomId) }?.sortedWith(subSpaceComparator) + val subSpaces = childSummary.spaceChildren?.filter { childSpace -> spaceSummaries.containsSpaceId(childSpace.childRoomId) } + ?.sortedWith(subSpaceComparator) newSubSpaceSummaryItem { id(id) diff --git a/vector/src/main/res/layout/item_new_space.xml b/vector/src/main/res/layout/item_new_space.xml index 3d627fa782..fc023ebd6e 100644 --- a/vector/src/main/res/layout/item_new_space.xml +++ b/vector/src/main/res/layout/item_new_space.xml @@ -66,7 +66,7 @@ android:layout_height="48dp" android:layout_marginEnd="21dp" android:background="?selectableItemBackground" - android:importantForAccessibility="no" + android:contentDescription="@string/a11y_expand_space_children" android:scaleType="centerInside" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" diff --git a/vector/src/main/res/layout/item_new_sub_space.xml b/vector/src/main/res/layout/item_new_sub_space.xml index 1c4afcea18..014568e26d 100644 --- a/vector/src/main/res/layout/item_new_sub_space.xml +++ b/vector/src/main/res/layout/item_new_sub_space.xml @@ -79,7 +79,7 @@ android:layout_height="32dp" android:layout_marginEnd="24dp" android:background="?selectableItemBackground" - android:importantForAccessibility="no" + android:contentDescription="@string/a11y_expand_space_children" android:scaleType="centerInside" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 0b62c16f92..bc247c38aa 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -141,6 +141,7 @@ Create Room Change Space Explore Rooms + Expand space children