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

Commit e65070f2 authored by Saroj Duwal's avatar Saroj Duwal
Browse files

Adding `Heading` semantics to title of Setting page

This change will make talkback read the Title as "Heading"

Bug: b/321060357

Change-Id: Ie18d63c9910887dbaba6d40aa386f54723bd0a66
parent 50deebbd
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -64,6 +64,8 @@ import androidx.compose.ui.layout.layoutId
import androidx.compose.ui.layout.onGloballyPositioned
import androidx.compose.ui.layout.onGloballyPositioned
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.heading
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.Constraints
@@ -129,7 +131,8 @@ private fun Title(title: String, maxLines: Int = Int.MAX_VALUE) {
        modifier = Modifier.padding(
        modifier = Modifier.padding(
            start = SettingsDimension.itemPaddingAround,
            start = SettingsDimension.itemPaddingAround,
            end = SettingsDimension.itemPaddingEnd,
            end = SettingsDimension.itemPaddingEnd,
        ),
        )
        .semantics { heading() },
        overflow = TextOverflow.Ellipsis,
        overflow = TextOverflow.Ellipsis,
        maxLines = maxLines,
        maxLines = maxLines,
    )
    )