Skip to content

Commit 5841f4e

Browse files
committed
Add android:label to compose sample activities for TalkBack
TalkBack announces android:label on Activity entry. Without per-activity labels, every screen was announced as 'Chat Sample Compose'. Each non-routing activity now has a screen-specific label, reusing existing sample/SDK strings where they fit; only 'channel_title' and 'user_profile_title' are new keys.
1 parent 152245e commit 5841f4e

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

stream-chat-android-compose-sample/src/main/AndroidManifest.xml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,54 +66,71 @@
6666
<activity
6767
android:name=".ui.login.UserLoginActivity"
6868
android:exported="false"
69+
android:label="@string/user_login_screen_title"
6970
/>
7071
<activity
7172
android:name=".ui.login.CustomLoginActivity"
7273
android:exported="false"
74+
android:label="@string/user_login_advanced_options"
7375
android:windowSoftInputMode="adjustResize"
7476
/>
7577
<activity
7678
android:name=".ui.chats.ChatsActivity"
7779
android:exported="false"
80+
android:label="@string/app_bottom_bar_chats"
7881
/>
7982
<activity
8083
android:name=".feature.channel.list.ChannelsActivity"
8184
android:exported="false"
85+
android:label="@string/app_bottom_bar_chats"
8286
/>
8387
<activity
8488
android:name=".ui.channel.ChannelActivity"
8589
android:exported="false"
90+
android:label="@string/channel_title"
8691
android:windowSoftInputMode="adjustResize"
8792
/>
8893
<activity
8994
android:name=".ui.channel.DirectChannelInfoActivity"
9095
android:exported="false"
96+
android:label="@string/stream_ui_channel_info_contact_title"
9197
/>
9298
<activity
9399
android:name=".ui.channel.GroupChannelInfoActivity"
94100
android:exported="false"
101+
android:label="@string/stream_ui_channel_info_group_title"
95102
/>
96103
<activity
97104
android:name=".ui.pinned.PinnedMessagesActivity"
98105
android:exported="false"
106+
android:label="@string/pinned_messages_title"
99107
/>
100108
<activity
101109
android:name=".feature.channel.add.AddChannelActivity"
102110
android:exported="false"
111+
android:label="@string/add_channel_title"
103112
android:windowSoftInputMode="adjustResize"
104113
/>
105114
<activity
106115
android:name=".feature.channel.add.group.AddGroupChannelActivity"
107116
android:exported="false"
117+
android:label="@string/add_group_channel_members_title"
108118
android:windowSoftInputMode="adjustResize"
109119
/>
110120
<activity
111121
android:name=".feature.channel.draft.DraftChannelActivity"
112122
android:exported="false"
123+
android:label="@string/stream_compose_channel_list_header_new_chat"
113124
android:windowSoftInputMode="adjustResize"
114125
/>
115-
<activity android:name=".feature.reminders.MessageRemindersActivity" />
116-
<activity android:name=".ui.profile.UserProfileActivity" />
126+
<activity
127+
android:name=".feature.reminders.MessageRemindersActivity"
128+
android:label="@string/reminders_title"
129+
/>
130+
<activity
131+
android:name=".ui.profile.UserProfileActivity"
132+
android:label="@string/user_profile_title"
133+
/>
117134
<activity
118135
android:name=".ui.channel.attachments.ChannelFilesAttachmentsActivity"
119136
android:label="@string/stream_ui_channel_attachments_files_title"

stream-chat-android-compose-sample/src/main/res/values/strings.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@
128128
<string name="channel_attachments_files_loading_more_error">Failed to load more files attachments</string>
129129

130130
<!-- Channel -->
131+
<string name="channel_title">Channel</string>
131132
<string name="channel_open_info">Open channel info</string>
132133

134+
<!-- User Profile -->
135+
<string name="user_profile_title">Profile</string>
136+
133137
</resources>

0 commit comments

Comments
 (0)