Skip to content

Commit

Permalink
Improve semantic labelling on speed selector button.
Browse files Browse the repository at this point in the history
  • Loading branch information
amugofjava committed Dec 24, 2024
1 parent 5181801 commit 6d70eed
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lib/ui/widgets/speed_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ class _SpeedSelectorWidgetState extends State<SpeedSelectorWidget> {
height: 48.0,
width: 48.0,
child: Center(
child: Text(
snapshot.data!.playbackSpeed == 1.0 ? 'x1' : 'x${snapshot.data!.playbackSpeed.toTenth}',
semanticsLabel: L.of(context)!.playback_speed_label,
style: TextStyle(
fontSize: 16.0,
color: Theme.of(context).iconTheme.color,
child: Semantics(
button: true,
child: Text(
semanticsLabel: '${L.of(context)!.playback_speed_label} ${snapshot.data!.playbackSpeed.toTenth}',
snapshot.data!.playbackSpeed == 1.0 ? 'x1' : 'x${snapshot.data!.playbackSpeed.toTenth}',
style: TextStyle(
fontSize: 16.0,
color: Theme.of(context).iconTheme.color,
),
),
),
),
Expand Down

0 comments on commit 6d70eed

Please sign in to comment.