Skip to content

A fully functional Android app built entirely with Kotlin and Jetpack Compose

Fix content descriptions on app bars

Caren Changef902234957f
diff --git a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt
index 7a607be0c..cebe9fc05 100644
--- a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt
+++ b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt
@@ -138,11 +138,11 @@ fun ForYouScreen(
titleRes = R.string.top_app_bar_title,
navigationIcon = NiaIcons.Search,
navigationIconContentDescription = stringResource(
- id = R.string.top_app_bar_navigation_button_content_desc
+ id = R.string.for_you_top_app_bar_navigation_button_content_desc
),
actionIcon = NiaIcons.AccountCircle,
actionIconContentDescription = stringResource(
- id = R.string.top_app_bar_navigation_button_content_desc
+ id = R.string.for_you_top_app_bar_action_button_content_desc
),
colors = TopAppBarDefaults.centerAlignedTopAppBarColors(
containerColor = Color.Transparent
diff --git a/feature-foryou/src/main/res/values/strings.xml b/feature-foryou/src/main/res/values/strings.xml
index 0c6428ca7..d19271633 100644
--- a/feature-foryou/src/main/res/values/strings.xml
+++ b/feature-foryou/src/main/res/values/strings.xml
@@ -24,8 +24,8 @@
<string name="onboarding_guidance_title">What are you interested in?</string>
<string name="onboarding_guidance_subtitle">Updates from topics you follow will appear here. Follow some things to get started.</string>
<string name="top_app_bar_title">Now in Android</string>
- <string name="top_app_bar_action_button_content_desc">My account</string>
- <string name="top_app_bar_navigation_button_content_desc">Search</string>
+ <string name="for_you_top_app_bar_action_button_content_desc">My account</string>
+ <string name="for_you_top_app_bar_navigation_button_content_desc">Search</string>
<!-- Authors-->
<string name="following">You are following</string>
diff --git a/feature-interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsScreen.kt b/feature-interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsScreen.kt
index f8a462a5a..912a5a21c 100644
--- a/feature-interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsScreen.kt
+++ b/feature-interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsScreen.kt
@@ -87,11 +87,11 @@ fun InterestsScreen(
titleRes = R.string.interests,
navigationIcon = NiaIcons.Search,
navigationIconContentDescription = stringResource(
- id = R.string.top_app_bar_navigation_button_content_desc
+ id = R.string.interests_top_app_bar_navigation_button_content_desc
),
actionIcon = NiaIcons.MoreVert,
actionIconContentDescription = stringResource(
- id = R.string.top_app_bar_navigation_button_content_desc
+ id = R.string.interests_top_app_bar_action_button_content_desc
),
colors = TopAppBarDefaults.centerAlignedTopAppBarColors(
containerColor = Color.Transparent
diff --git a/feature-interests/src/main/res/values/strings.xml b/feature-interests/src/main/res/values/strings.xml
index e8d9f135d..5e5df4b58 100644
--- a/feature-interests/src/main/res/values/strings.xml
+++ b/feature-interests/src/main/res/values/strings.xml
@@ -22,6 +22,6 @@
<string name="interests_empty_header">"No available data"</string>
<string name="interests_card_follow_button_content_desc">Follow interest button</string>
<string name="interests_card_unfollow_button_content_desc">Unfollow interest button</string>
- <string name="top_app_bar_action_button_content_desc">Menu</string>
- <string name="top_app_bar_navigation_button_content_desc">Search</string>
+ <string name="interests_top_app_bar_action_button_content_desc">Menu</string>
+ <string name="interests_top_app_bar_navigation_button_content_desc">Search</string>
</resources>