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

Commit e170a195 authored by Joshua Mokut's avatar Joshua Mokut Committed by Android (Google) Code Review
Browse files

Merge "Added meaningful accessibility labels for add/delete shortcut buttons" into main

parents d1f16038 4ab4ab87
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3919,6 +3919,16 @@
         The helper is a component that shows the user which keyboard shortcuts they can use.
         [CHAR LIMIT=NONE] -->
    <string name="shortcut_helper_plus_symbol">+</string>
    <!-- Accessibility label for the plus icon on a shortcut in shortcut helper that allows the user
         to add a new custom shortcut.
         The helper is a component that shows the user which keyboard shortcuts they can use.
         [CHAR LIMIT=NONE] -->
    <string name="shortcut_helper_add_shortcut_button_label">Add shortcut</string>
    <!-- Accessibility label for the bin(trash) icon on a shortcut in shortcut helper that allows the
         user to delete an existing custom shortcut.
         The helper is a component that shows the user which keyboard shortcuts they can use.
         [CHAR LIMIT=NONE] -->
    <string name="shortcut_helper_delete_shortcut_button_label">Delete shortcut</string>

    <!-- Keyboard touchpad tutorial scheduler-->
    <!-- Notification title for launching keyboard tutorial [CHAR_LIMIT=100] -->
+2 −0
Original line number Diff line number Diff line
@@ -729,6 +729,7 @@ private fun AddShortcutButton(onClick: () -> Unit) {
        contentColor = MaterialTheme.colorScheme.primary,
        contentPaddingVertical = 0.dp,
        contentPaddingHorizontal = 0.dp,
        contentDescription = stringResource(R.string.shortcut_helper_add_shortcut_button_label),
    )
}

@@ -749,6 +750,7 @@ private fun DeleteShortcutButton(onClick: () -> Unit) {
        contentColor = MaterialTheme.colorScheme.primary,
        contentPaddingVertical = 0.dp,
        contentPaddingHorizontal = 0.dp,
        contentDescription = stringResource(R.string.shortcut_helper_delete_shortcut_button_label),
    )
}

+2 −2
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ fun ShortcutHelperButton(
    contentPaddingVertical: Dp = 10.dp,
    enabled: Boolean = true,
    border: BorderStroke? = null,
    contentDescription: String? = null,
) {
    ShortcutHelperButtonSurface(
        onClick = onClick,
@@ -254,8 +255,7 @@ fun ShortcutHelperButton(
                Icon(
                    tint = contentColor,
                    imageVector = iconSource.imageVector,
                    contentDescription =
                        null, // TODO this probably should not be null for accessibility.
                    contentDescription = contentDescription,
                    modifier = Modifier.size(20.dp).wrapContentSize(Alignment.Center),
                )
            }