Skip to content

Slider : Cannot change value with Talkback in some cases #81

@Nath-IS

Description

@Nath-IS

Description:

In some Slider configurations, value cannot be changed with Talkback when the thumb is at 50% of the slider.

Steps to Reproduce:

Initialize a basic Slider with the following state:

    val sliderState = rememberSliderState(
        initialValue = 0f,
        steps = 4,
    )

Activate Talkback, and put focus on the slider. Swipe up multiple times to change the value of the slider.

Expected Behavior:

For every up swipe, the slider value is increased until the last one.

Actual Behavior:

When the value has reached 50%, whenever you swipe up or down, the slider is stuck at 50%.

I checked your code and found that the problem seems to be a mix between the sliderSemantics action function and the setValue state function. In the example above, when the slider is at 50%, after swiping up, setValue function receives 0.6f. So, snappedValue is set to 0.5f.

Can you check this problem please?

  • Library version: 1.31.1
  • Compose BOM version: 2025.05.01

I recorded a video of a basic Slider as described above:
https://github.com/user-attachments/assets/791542bf-fa87-4898-a1b6-c63e4a76ad82

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions