diff options
| author | 2024-09-05 13:20:52 -0700 | |
|---|---|---|
| committer | 2024-09-05 16:04:23 -0700 | |
| commit | c1361a46d076fcc78a62a92ccc6bf5e019076ac7 (patch) | |
| tree | 405dd92f752ddfec7ba2444365b8c56806b25974 | |
| parent | 13db21f1e1cd6f2cceadad44ab16aa49e399f9eb (diff) | |
Set an explicit pane title for communal hub.
This should fix a bug where TalkBack sometimes announces the wrong title
when entering communal hub.
Bug: 360753713
Test: Manually by enabling TalkBack and using actions from the lock
screen to enter communal hub.
Flag: EXEMPT bugfix
Change-Id: I880eae4a7ac5e6d7abae8f76ce2fb657305798bc
| -rw-r--r-- | packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt | 8 |
1 files changed, 7 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 bcbf933d9370..c63b29dd9051 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 @@ -137,6 +137,7 @@ import androidx.compose.ui.semantics.clearAndSetSemantics import androidx.compose.ui.semantics.contentDescription import androidx.compose.ui.semantics.customActions import androidx.compose.ui.semantics.onClick +import androidx.compose.ui.semantics.paneTitle import androidx.compose.ui.semantics.semantics import androidx.compose.ui.semantics.testTagsAsResourceId import androidx.compose.ui.text.style.TextAlign @@ -241,10 +242,15 @@ fun CommunalHub( } } + val paneTitle = stringResource(R.string.accessibility_content_description_for_communal_hub) + Box( modifier = modifier - .semantics { testTagsAsResourceId = true } + .semantics { + testTagsAsResourceId = true + this.paneTitle = paneTitle + } .testTag(COMMUNAL_HUB_TEST_TAG) .fillMaxSize() // Observe taps for selecting items |