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

Commit d16be090 authored by Angela Wang's avatar Angela Wang
Browse files

Set content description on ambien volume sliders

Added content descriptions to the UI component to improve accessibility for TalkBack users.

Flag: EXEMPT bugfix
Bug: 397134669
Test: manually test with TalkBack
Change-Id: If0c40d7b91061da5e100e49e71279adb6f69e77f
parent 90feafb1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -179,6 +179,12 @@
    <string name="bluetooth_ambient_volume_control_left">Left</string>
    <!-- Connected devices settings. The text to show the control is for right side device. [CHAR LIMIT=30] -->
    <string name="bluetooth_ambient_volume_control_right">Right</string>
    <!-- Connected devices settings. Content description for unified ambient control slider. [CHAR LIMIT=NONE] -->
    <string name="bluetooth_ambient_volume_control_description">Surroundings</string>
    <!-- Connected devices settings. Content description for left ambient control slider. [CHAR LIMIT=NONE] -->
    <string name="bluetooth_ambient_volume_control_left_description">Left surroundings</string>
    <!-- Connected devices settings. Content description for right ambient control slider.. [CHAR LIMIT=NONE] -->
    <string name="bluetooth_ambient_volume_control_right_description">Right surroundings</string>
    <!-- Connected devices settings. Content description for a button, that mute ambient volume [CHAR_LIMIT=NONE] -->
    <string name="bluetooth_ambient_volume_mute">Mute surroundings</string>
    <!-- Connected devices settings. Content description for a button, that unmute ambient volume [CHAR LIMIT=NONE] -->
+7 −0
Original line number Diff line number Diff line
@@ -318,9 +318,16 @@ public class AmbientVolumePreference extends PreferenceGroup implements AmbientV
        if (side == SIDE_LEFT) {
            slider.setTitle(
                    getContext().getString(R.string.bluetooth_ambient_volume_control_left));
            slider.setSliderContentDescription(getContext().getString(
                    R.string.bluetooth_ambient_volume_control_left_description));
        } else if (side == SIDE_RIGHT) {
            slider.setTitle(
                    getContext().getString(R.string.bluetooth_ambient_volume_control_right));
            slider.setSliderContentDescription(getContext().getString(
                    R.string.bluetooth_ambient_volume_control_right_description));
        } else {
            slider.setSliderContentDescription(getContext().getString(
                    R.string.bluetooth_ambient_volume_control_description));
        }
        mSideToSliderMap.put(side, slider);
    }