You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CupertinoSlider with null onChanged doesn't display as disabled #106691
Screen readers miss it too. A disabled CupertinoSlider has no enabled state, so VoiceOver never says "dimmed", as it does for a disabled UISlider. flutter/packages#13419 dims it and flutter/packages#12710 keeps its value, but neither sets the enabled state.
Widget test
import'package:cupertino_ui/cupertino_ui.dart';
import'package:flutter_test/flutter_test.dart';
voidmain() {
testWidgets('a disabled CupertinoSlider tells screen readers it is disabled', (tester) async {
final semantics = tester.ensureSemantics();
await tester.pumpWidget(
constCupertinoApp(home:Center(child:CupertinoSlider(value:0.5, onChanged:null))),
);
expect(
tester.getSemantics(find.byType(CupertinoSlider)),
// Fails: no enabled state.containsSemantics(isSlider:true, hasEnabledState:true, isEnabled:false),
);
semantics.dispose();
});
}
Activity
TahaTesser commentedon Jun 28, 2022
@guidezpl
Great catch! Here is a quick comparison between Flutter and iOS Storyboard (both disabled).
code sample
LahaLuhem commentedon Oct 28, 2026
Screen readers miss it too. A disabled
CupertinoSliderhas no enabled state, so VoiceOver never says "dimmed", as it does for a disabledUISlider. flutter/packages#13419 dims it and flutter/packages#12710 keeps its value, but neither sets the enabled state.Widget test
[cupertino_ui] Dim disabled CupertinoSlider controls (flutter#13419)