diff options
| author | 2024-11-22 18:10:54 +0000 | |
|---|---|---|
| committer | 2024-11-22 18:10:54 +0000 | |
| commit | 0e521bb3d90bcbd077ff7922a79cf4a9ea7546f6 (patch) | |
| tree | b7e05514e1ba4bc3c26930c3dbeed419ab56649c | |
| parent | a1b451e326b57e94a70e88ab72a1fec6d69f39d4 (diff) | |
| parent | 18b4ee4843e33a30c7f614f3ad9ba2723b2e5ce5 (diff) | |
Merge "Allow title for empty state cta to be focusable" into main
| -rw-r--r-- | packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt index 5b1203fa17c9..787edfb9168c 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt @@ -141,6 +141,7 @@ import androidx.compose.ui.semantics.CustomAccessibilityAction import androidx.compose.ui.semantics.clearAndSetSemantics import androidx.compose.ui.semantics.contentDescription import androidx.compose.ui.semantics.customActions +import androidx.compose.ui.semantics.heading import androidx.compose.ui.semantics.onClick import androidx.compose.ui.semantics.paneTitle import androidx.compose.ui.semantics.semantics @@ -902,11 +903,17 @@ private fun EmptyStateCta(contentPadding: PaddingValues, viewModel: BaseCommunal Arrangement.spacedBy(Dimensions.Spacing, Alignment.CenterVertically), horizontalAlignment = Alignment.CenterHorizontally, ) { + val titleForEmptyStateCTA = stringResource(R.string.title_for_empty_state_cta) Text( - text = stringResource(R.string.title_for_empty_state_cta), + text = titleForEmptyStateCTA, style = MaterialTheme.typography.displaySmall, textAlign = TextAlign.Center, color = colors.secondary, + modifier = + Modifier.focusable().semantics(mergeDescendants = true) { + contentDescription = titleForEmptyStateCTA + heading() + }, ) Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center) { Button( |