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

Commit 187fe17b authored by Dan Sandler's avatar Dan Sandler
Browse files

A11y: Annotate the QS brightness slider properly.

Instead of just clobbering SeekBar's awesome feedback with
"Display brightness" right on the slider, we move that
string up to the parent and set it as the slider's label.

The new utterance will be: "<standard seekbar feedback> for
<label>", which in this case comes out as:

"Seek control, fifteen percent, for display brightness."

Bug: 20343730
Change-Id: I1223b3b07b6bf67ee3df22094ec5976b5188d968
parent 89124000
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_weight="1"
        android:contentDescription="@string/accessibility_brightness"
        systemui:text="@string/status_bar_settings_auto_brightness_label" />

</LinearLayout>
+0 −1
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
        android:paddingBottom="16dp"
        android:thumb="@drawable/ic_brightness_thumb"
        android:splitTrack="false"
        android:contentDescription="@string/accessibility_brightness"
        />
    <TextView
        android:id="@+id/label"
+2 −0
Original line number Diff line number Diff line
@@ -74,6 +74,8 @@ public class ToggleSlider extends RelativeLayout {
        mLabel = (TextView) findViewById(R.id.label);
        mLabel.setText(a.getString(R.styleable.ToggleSlider_text));

        setLabelFor(R.id.slider); // use our a11y text to annotate, not replace, the slider's

        a.recycle();
    }