Skip to content

Conversation

m-sasha
Copy link
Member

@m-sasha m-sasha commented Jun 3, 2025

For nodes with SemanticsProperties.ProgressBarRangeInfo that also have a SemanticsActions.SetProgress report AWT role as AccessibleRole.SLIDER. This indicates to accessibility (specifically VoiceOver) that it should announce the value on every change.

Fixes https://youtrack.jetbrains.com/issue/CMP-8309

Testing

Tested manually with

fun main() = singleWindowApplication {
    Column(
        Modifier.fillMaxSize(),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {

        var value by remember { mutableStateOf(42f) }
        Slider(
            value = value,
            onValueChange = { value = it },
            valueRange = 0f..100f,
            modifier = Modifier.size(200.dp, 50.dp)
        )

        Spacer(Modifier.height(24.dp))

        LinearProgressIndicator(
            progress = value / 100f,
            modifier = Modifier.width(200.dp)
        )
    }
}

This could be tested by QA

Release Notes

Fixes - Desktop

  • [Accessibility, macOS] Fixed VoiceOver to announce a Slider's value on every change.

@m-sasha m-sasha requested a review from igordmn June 3, 2025 16:57
@m-sasha m-sasha merged commit 3670892 into jb-main Jun 10, 2025
11 checks passed
@m-sasha m-sasha deleted the m-sasha/fix-slider-value-announcements branch June 10, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants