2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

Bug 1807369 - Improve accessibility for 'Learn more' hyperlink from the Pocket homepage header

This commit is contained in:
Alexandru2909 2023-02-17 10:53:14 +02:00 committed by mergify[bot]
parent 1c906a5038
commit e0bc9347f3
2 changed files with 17 additions and 1 deletions

View File

@ -45,6 +45,9 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.onClick
import androidx.compose.ui.semantics.role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.testTag
import androidx.compose.ui.semantics.testTagsAsResourceId
@ -512,7 +515,18 @@ fun PoweredByPocketHeader(
Spacer(modifier = Modifier.width(16.dp))
Column {
val onClickLabel = stringResource(id = R.string.a11y_action_label_pocket_learn_more)
Column(
Modifier.semantics(mergeDescendants = true) {
role = Role.Button
onClick(label = onClickLabel) {
onLearnMoreClicked(
"https://www.mozilla.org/en-US/firefox/pocket/?$POCKET_FEATURE_UTM_KEY_VALUE",
)
false
}
},
) {
Text(
text = stringResource(
R.string.pocket_stories_feature_title_2,

View File

@ -1964,4 +1964,6 @@
<string name="a11y_action_label_wallpaper_collection_learn_more">open link to learn more about this collection</string>
<!-- Action label for links that point to an article. Talkback will append this to say "Double tap to read the article". -->
<string name="a11y_action_label_read_article">read the article</string>
<!-- Action label for links to the Firefox Pocket website. Talkback will append this to say "Double tap to open link to learn more". -->
<string name="a11y_action_label_pocket_learn_more">open link to learn more</string>
</resources>