Skip to content

Commit 0e6876d

Browse files
authored
Merge pull request #1211 from eltahirsami/fix-accessibility-labels
Improve accessibility labels for workout controls
2 parents 017ac10 + 27a66b5 commit 0e6876d

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

lib/l10n/app_en.arb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,14 @@
891891
"@add": {
892892
"description": "Add button text"
893893
},
894+
"increase": "Increase",
895+
"@increase": {
896+
"description": "Tooltip / screen-reader label for a button that increases a numeric input by one step"
897+
},
898+
"decrease": "Decrease",
899+
"@decrease": {
900+
"description": "Tooltip / screen-reader label for a button that decreases a numeric input by one step"
901+
},
894902
"variations": "Variations",
895903
"@variations": {
896904
"description": "Variations of one exercise (e.g. benchpress and benchpress narrow)"

lib/widgets/routines/forms/repetitions.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ class _RepetitionInputWidgetState extends ConsumerState<RepetitionInputWidget> {
136136
// "Quick-remove" button
137137
IconButton(
138138
icon: const Icon(Icons.remove, color: Colors.black),
139+
tooltip: i18n.decrease,
139140
onPressed: () {
140141
final base = currentReps ?? 0;
141142
final newValue = base - widget.valueChange;
@@ -178,6 +179,7 @@ class _RepetitionInputWidgetState extends ConsumerState<RepetitionInputWidget> {
178179
// "Quick-add" button
179180
IconButton(
180181
icon: const Icon(Icons.add, color: Colors.black),
182+
tooltip: i18n.increase,
181183
onPressed: () {
182184
final base = currentReps ?? 0;
183185
final newValue = base + widget.valueChange;

lib/widgets/routines/forms/weight.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class _WeightInputWidgetState extends ConsumerState<WeightInputWidget> {
135135
IconButton(
136136
// "Quick-remove" button
137137
icon: const Icon(Icons.remove, color: Colors.black),
138+
tooltip: i18n.decrease,
138139
onPressed: () {
139140
final base = currentWeight ?? 0;
140141
final newValue = base - widget.valueChange;
@@ -177,6 +178,7 @@ class _WeightInputWidgetState extends ConsumerState<WeightInputWidget> {
177178
// "Quick-add" button
178179
IconButton(
179180
icon: const Icon(Icons.add, color: Colors.black),
181+
tooltip: i18n.increase,
180182
onPressed: () {
181183
final base = currentWeight ?? 0;
182184
final newValue = base + widget.valueChange;

0 commit comments

Comments
 (0)