Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1361a46 authored by Will Leshner's avatar Will Leshner
Browse files

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
parent 13db21f1
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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