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

Commit 73341d7b authored by Olivier St-Onge's avatar Olivier St-Onge
Browse files

Add tile's label to the a11y action for adding tiles

It now reads as "Add [label] to the last position" instead of "Add tile to the last position"

Test: manually with Talkback
Flag: com.android.systemui.qs_ui_refactor_compose_fragment
Fixes: 412621096
Change-Id: Ib6da2715112af0eb080ecf701e014d1171e65024
parent dd81be69
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2657,6 +2657,9 @@
    <!-- Accessibility action of action to add QS tile to end. [CHAR LIMIT=NONE] -->
    <string name="accessibility_qs_edit_tile_add_action">Add tile to the last position</string>

    <!-- Accessibility action of action to add a named QS tile to the end. [CHAR LIMIT=NONE] -->
    <string name="accessibility_qs_edit_named_tile_add_action">Add <xliff:g id="name" example="Internet">%1$s</xliff:g> to the last position</string>

    <!-- Accessibility action for context menu to move QS tile [CHAR LIMIT=NONE] -->
    <string name="accessibility_qs_edit_tile_start_move">Move tile</string>

+4 −3
Original line number Diff line number Diff line
@@ -971,6 +971,8 @@ private fun AvailableTileGridCell(
        onAddTile(cell.tileSpec)
        selectionState.select(cell.tileSpec)
    }
    val clickLabel =
        stringResource(id = R.string.accessibility_qs_edit_named_tile_add_action, cell.label.text)

    // Displays the tile as an icon tile with the label underneath
    Column(
@@ -979,7 +981,7 @@ private fun AvailableTileGridCell(
        modifier =
            modifier
                .graphicsLayer { this.alpha = alpha }
                .clickable(enabled = !cell.isCurrent, onClick = onClick)
                .clickable(enabled = !cell.isCurrent, onClick = onClick, onClickLabel = clickLabel)
                .semantics { stateDescription?.let { this.stateDescription = it } },
    ) {
        Box(Modifier.fillMaxWidth().height(TileHeight)) {
@@ -1007,8 +1009,7 @@ private fun AvailableTileGridCell(

            StaticTileBadge(
                icon = Icons.Default.Add,
                contentDescription =
                    stringResource(id = R.string.accessibility_qs_edit_tile_add_action),
                contentDescription = clickLabel,
                enabled = !cell.isCurrent,
                onClick = onClick,
            )