Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions changelog.d/7016.wip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[New Layout] Improves talkback accessibility
6 changes: 4 additions & 2 deletions library/ui-strings/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,10 @@
<string name="start_chat">Start Chat</string>
<string name="create_room">Create Room</string>
<string name="explore_rooms">Explore Rooms</string>
<string name="a11y_expand_space_children">Expand space children</string>
<string name="a11y_collapse_space_children">Collapse space children</string>
<!-- Note to translators: %s refers to the space whose children is being expanded -->
<string name="a11y_expand_space_children">Expand %s children</string>
<!-- Note to translators: %s refers to the space whose children is being collapsed -->
<string name="a11y_collapse_space_children">Collapse %s children</string>

<!-- Last seen time -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ abstract class NewSpaceSummaryItem : VectorEpoxyModel<NewSpaceSummaryItem.Holder
holder.chevron.setOnClickListener(onToggleExpandListener)
holder.chevron.isVisible = hasChildren
holder.chevron.setImageResource(if (expanded) R.drawable.ic_expand_more else R.drawable.ic_arrow_right)
holder.chevron.contentDescription = context.getString(if (expanded) R.string.a11y_collapse_space_children else R.string.a11y_expand_space_children)
holder.chevron.contentDescription = context.getString(
if (expanded) R.string.a11y_collapse_space_children else R.string.a11y_expand_space_children,
matrixItem.displayName,
)

avatarRenderer.render(matrixItem, holder.avatar)
holder.unreadCounter.render(countState)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ abstract class NewSubSpaceSummaryItem : VectorEpoxyModel<NewSubSpaceSummaryItem.

override fun bind(holder: Holder) {
super.bind(holder)
val context = holder.root.context
holder.root.onClick(onSubSpaceSelectedListener)
holder.name.text = matrixItem.displayName
holder.root.isChecked = selected
Expand All @@ -63,6 +64,10 @@ abstract class NewSubSpaceSummaryItem : VectorEpoxyModel<NewSubSpaceSummaryItem.
)
holder.chevron.onClick(onToggleExpandListener)
holder.chevron.isVisible = hasChildren
holder.chevron.contentDescription = context.getString(
if (expanded) R.string.a11y_collapse_space_children else R.string.a11y_expand_space_children,
matrixItem.displayName,
)

holder.indent.isVisible = indent > 0
holder.indent.updateLayoutParams {
Expand Down
1 change: 0 additions & 1 deletion vector/src/main/res/layout/fragment_new_home_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:accessibilityTraversalBefore="@id/roomListView"
android:contentDescription="@string/a11y_create_message"
android:src="@drawable/ic_new_chat"
android:visibility="gone"
Expand Down
1 change: 1 addition & 0 deletions vector/src/main/res/layout/item_recent_room.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
android:layout_marginTop="4dp"
android:layout_marginBottom="16dp"
android:ellipsize="end"
android:importantForAccessibility="no"
android:lines="1"
android:textColor="?vctr_content_primary"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down