diff --git a/app/src/main/java/org/mozilla/fenix/settings/wallpaper/WallpaperSettings.kt b/app/src/main/java/org/mozilla/fenix/settings/wallpaper/WallpaperSettings.kt index 3d9f8438b..dcdedd429 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/wallpaper/WallpaperSettings.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/wallpaper/WallpaperSettings.kt @@ -40,7 +40,11 @@ import androidx.compose.ui.graphics.asImageBitmap import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.res.stringResource +import androidx.compose.ui.semantics.Role +import androidx.compose.ui.semantics.SemanticsPropertyReceiver import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.semantics.onClick +import androidx.compose.ui.semantics.role import androidx.compose.ui.semantics.semantics import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.tooling.preview.Preview @@ -126,7 +130,22 @@ private fun WallpaperGroupHeading( style = FirefoxTheme.typography.subtitle2, ) } else { - Column { + val label = stringResource(id = R.string.a11y_action_label_wallpaper_collection_learn_more) + val headingSemantics: SemanticsPropertyReceiver.() -> Unit = + if (collection.learnMoreUrl.isNullOrEmpty()) { + {} + } else { + { + role = Role.Button + onClick(label = label) { + onLearnMoreClick(collection.learnMoreUrl, collection.name) + false + } + } + } + Column( + modifier = Modifier.semantics(mergeDescendants = true, properties = headingSemantics), + ) { Text( text = stringResource(R.string.wallpaper_limited_edition_title), color = FirefoxTheme.colors.textSecondary, diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bf45efe2c..97f13d4a4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1880,4 +1880,6 @@ collapse expand + + open link to learn more about this collection