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

Commit 5e3da354 authored by Bhavuk Jain's avatar Bhavuk Jain
Browse files

Fix slider announcement when focussed on it the first time

The clock face width slider had an incorrect initial TalkBack
announcement because the `stateDescription` was not being set
until the user first interacted with it.

This was due to the slider's properties being set asynchronously.
The initial state description is now set immediately after the
slider's range and value are collected from the ViewModel,
ensuring it is available when TalkBack first focuses on the element.

Bug: 418223312
Flag: EXEMPT bugfix
Test: Tested by building and installing picker and checking the initial
announcement
Change-Id: Iaa4fbc07214bcd2b64edb947446712b1a772d156

Change-Id: Ia32e91f9ef03ce07a5b4aa5a25c67e61c86b69d0
parent c121e43e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -546,6 +546,7 @@ object ClockFloatingSheetBinder {
                        axisPresetSlider.valueTo = axisPresetsSliderViewModel.valueTo
                        axisPresetSlider.stepSize = axisPresetsSliderViewModel.stepSize
                        axisPresetSlider.clearOnSliderTouchListeners()
                        updateAccessibilityStateDescription(axisPresetSlider, axisPresetSlider.context)
                        axisPresetSlider.addOnSliderTouchListener(
                            object : OnSliderTouchListener {
                                override fun onStartTrackingTouch(slider: Slider) {}