From d7605eb29a37a393737e1d2459ecafdb09dacdb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20V=C3=A1gner?= Date: Thu, 8 Feb 2024 16:26:40 +0100 Subject: [PATCH 1/6] a11y: use proper contentDescription for walking mode and alert text more menu button rather than generic untitled string --- app/src/main/res/layout/card_motivation_alert_text.xml | 2 +- app/src/main/res/layout/card_walking_mode.xml | 2 +- app/src/main/res/values/strings.xml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/layout/card_motivation_alert_text.xml b/app/src/main/res/layout/card_motivation_alert_text.xml index 6b9e354..bffdab7 100644 --- a/app/src/main/res/layout/card_motivation_alert_text.xml +++ b/app/src/main/res/layout/card_motivation_alert_text.xml @@ -56,7 +56,7 @@ android:src="@drawable/ic_more_vert_black_24dp" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:contentDescription="@android:string/untitled"/> + android:contentDescription="@string/a11y_options"/> diff --git a/app/src/main/res/layout/card_walking_mode.xml b/app/src/main/res/layout/card_walking_mode.xml index 39e230b..e065773 100644 --- a/app/src/main/res/layout/card_walking_mode.xml +++ b/app/src/main/res/layout/card_walking_mode.xml @@ -104,7 +104,7 @@ style="@style/SimpleImageButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:contentDescription="@android:string/untitled" + android:contentDescription="@string/a11y_options" android:src="@drawable/ic_more_vert_black_24dp" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8becc33..0bb2a05 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -365,4 +365,5 @@ Many Android devices also support specific step hardware like a step counter and step detector. They can be more reliable than the accelerometer because they are specifically designed to register step events. However, since Android devices are very diverse it is not guaranteed to work best. The detector is a fast way to detect step events while the counter does some post-processing to increase certainty about actual steps taken. The Activity Recognition permission is needed to access step data. The permission was denied multiple times. You will need to enable the permission manually though the the device settings. + Options From a0ad3debf4a7bf02a6785b160f622815d978796b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20V=C3=A1gner?= Date: Thu, 8 Feb 2024 23:03:43 +0100 Subject: [PATCH 2/6] a11y: Add more content descriptions to image only buttons --- app/src/main/res/layout/activity_motivation_alert_texts.xml | 3 ++- app/src/main/res/layout/activity_training_overview.xml | 3 ++- app/src/main/res/layout/activity_walking_modes.xml | 3 ++- app/src/main/res/layout/card_activity_bar_chart.xml | 3 ++- app/src/main/res/layout/card_activity_chart.xml | 3 ++- app/src/main/res/layout/card_activity_summary.xml | 4 +++- app/src/main/res/layout/card_training_session.xml | 3 ++- app/src/main/res/layout/widget_2x1.xml | 2 ++ app/src/main/res/layout/widget_3x1.xml | 5 ++++- app/src/main/res/values/strings.xml | 4 ++++ 10 files changed, 25 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/layout/activity_motivation_alert_texts.xml b/app/src/main/res/layout/activity_motivation_alert_texts.xml index 6ca9f74..b83e459 100644 --- a/app/src/main/res/layout/activity_motivation_alert_texts.xml +++ b/app/src/main/res/layout/activity_motivation_alert_texts.xml @@ -70,7 +70,8 @@ android:layout_width="56dp" android:layout_height="56dp" android:layout_margin="@dimen/fab_margin" + android:contentDescription="@string/a11y_add" android:src="@drawable/ic_bell_plus_white_24dp" app:layout_anchor="@id/motivation_text_list" app:layout_anchorGravity="bottom|right|end" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_training_overview.xml b/app/src/main/res/layout/activity_training_overview.xml index 68621f1..984f312 100644 --- a/app/src/main/res/layout/activity_training_overview.xml +++ b/app/src/main/res/layout/activity_training_overview.xml @@ -71,7 +71,8 @@ android:layout_width="56dp" android:layout_height="56dp" android:layout_margin="@dimen/fab_margin" + android:contentDescription="@string/a11y_start_training" android:src="@drawable/ic_plus_white_24dp" app:layout_anchor="@id/training_overview_list" app:layout_anchorGravity="bottom|right|end" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_walking_modes.xml b/app/src/main/res/layout/activity_walking_modes.xml index 6df6fb1..19791a9 100644 --- a/app/src/main/res/layout/activity_walking_modes.xml +++ b/app/src/main/res/layout/activity_walking_modes.xml @@ -40,7 +40,8 @@ android:layout_width="56dp" android:layout_height="56dp" android:layout_margin="@dimen/fab_margin" + android:contentDescription="@string/a11y_add" android:src="@drawable/ic_plus_white_24dp" app:layout_anchor="@id/walking_modes_list" app:layout_anchorGravity="bottom|right|end" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/card_activity_bar_chart.xml b/app/src/main/res/layout/card_activity_bar_chart.xml index 75ca2f7..860e5df 100644 --- a/app/src/main/res/layout/card_activity_bar_chart.xml +++ b/app/src/main/res/layout/card_activity_bar_chart.xml @@ -62,6 +62,7 @@ android:layout_alignTop="@+id/period" android:layout_marginRight="16dp" android:layout_marginEnd="16dp" + android:contentDescription="@string/a11y_options" android:src="@drawable/ic_more_vert_black_24dp" /> @@ -75,4 +76,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/card_activity_chart.xml b/app/src/main/res/layout/card_activity_chart.xml index 2fa42fb..15671c9 100644 --- a/app/src/main/res/layout/card_activity_chart.xml +++ b/app/src/main/res/layout/card_activity_chart.xml @@ -62,6 +62,7 @@ android:layout_alignTop="@+id/period" android:layout_marginRight="16dp" android:layout_marginEnd="16dp" + android:contentDescription="@string/a11y_options" android:src="@drawable/ic_more_vert_black_24dp" /> @@ -75,4 +76,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/card_activity_summary.xml b/app/src/main/res/layout/card_activity_summary.xml index 3b98750..f2260e9 100644 --- a/app/src/main/res/layout/card_activity_summary.xml +++ b/app/src/main/res/layout/card_activity_summary.xml @@ -49,6 +49,7 @@ style="@style/SimpleImageButton" android:layout_width="wrap_content" android:layout_height="match_parent" + android:contentDescription="@string/a11y_prev" android:src="@drawable/ic_chevron_left_black_24dp"/> - \ No newline at end of file + diff --git a/app/src/main/res/layout/card_training_session.xml b/app/src/main/res/layout/card_training_session.xml index 00701bc..3c064dd 100644 --- a/app/src/main/res/layout/card_training_session.xml +++ b/app/src/main/res/layout/card_training_session.xml @@ -218,6 +218,7 @@ android:layout_alignParentRight="true" android:layout_alignTop="@+id/training_card_title" android:layout_marginRight="16dp" + android:contentDescription="@string/a11y_options" android:src="@drawable/ic_more_vert_black_24dp" /> @@ -377,4 +378,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/widget_2x1.xml b/app/src/main/res/layout/widget_2x1.xml index 7523ed4..37a016c 100644 --- a/app/src/main/res/layout/widget_2x1.xml +++ b/app/src/main/res/layout/widget_2x1.xml @@ -65,6 +65,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/transparent" + android:contentDescription="@string/pause_step_detection" android:src="@android:drawable/ic_media_pause" /> diff --git a/app/src/main/res/layout/widget_3x1.xml b/app/src/main/res/layout/widget_3x1.xml index 2d0c27b..c7fd8e6 100644 --- a/app/src/main/res/layout/widget_3x1.xml +++ b/app/src/main/res/layout/widget_3x1.xml @@ -65,6 +65,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/transparent" + android:contentDescription="@string/pause_step_detection" android:src="@android:drawable/ic_media_pause" /> @@ -87,6 +89,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/transparent" + android:contentDescription="@string/a11y_start_training" android:src="@drawable/ic_plus_white_24dp" /> - \ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0bb2a05..60e92cc 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -366,4 +366,8 @@ The Activity Recognition permission is needed to access step data. The permission was denied multiple times. You will need to enable the permission manually though the the device settings. Options + Add + Previous + Next + Start training From fba80de642c77d43ee96827e21abdc8aba711d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20V=C3=A1gner?= Date: Fri, 9 Feb 2024 00:27:39 +0100 Subject: [PATCH 3/6] a11y: Add content description to the walking modes summary button --- app/build.gradle | 5 ++++- app/src/main/res/layout/card_activity_summary.xml | 1 + app/src/main/res/values/strings.xml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index a5c9637..3bdb552 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -38,8 +38,11 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (pfaFile.exists()) { + signingConfig signingConfigs.'pfa-key' + } } debug { debuggable true diff --git a/app/src/main/res/layout/card_activity_summary.xml b/app/src/main/res/layout/card_activity_summary.xml index f2260e9..98d26df 100644 --- a/app/src/main/res/layout/card_activity_summary.xml +++ b/app/src/main/res/layout/card_activity_summary.xml @@ -86,6 +86,7 @@ android:id="@+id/periodMoreButton" style="@style/SimpleImageButton" android:layout_gravity="center_vertical" + android:contentDescription="@string/a11y_walking_modes" android:src="@drawable/ic_more_vert_black_24dp" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 60e92cc..0dcd437 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -370,4 +370,5 @@ Previous Next Start training + Walking modes From dd63aa24dbf9311b7f9da22f59c8760c10bfa490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20V=C3=A1gner?= Date: Fri, 9 Feb 2024 22:31:03 +0100 Subject: [PATCH 4/6] Lint: disable checking for missing translations --- app/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0dcd437..70e9c23 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . --> - + Pedometer Privacy Friendly Pedometer From a70c103d2acffadb7f800b0b8adaab9a50606080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20V=C3=A1gner?= Date: Sun, 18 Feb 2024 18:35:53 +0100 Subject: [PATCH 5/6] Revert "a11y: Add content description to the walking modes summary button" This reverts commit fba80de642c77d43ee96827e21abdc8aba711d3b. --- app/build.gradle | 5 +---- app/src/main/res/layout/card_activity_summary.xml | 1 - app/src/main/res/values/strings.xml | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3bdb552..a5c9637 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -38,11 +38,8 @@ android { buildTypes { release { - minifyEnabled true + minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - if (pfaFile.exists()) { - signingConfig signingConfigs.'pfa-key' - } } debug { debuggable true diff --git a/app/src/main/res/layout/card_activity_summary.xml b/app/src/main/res/layout/card_activity_summary.xml index 98d26df..f2260e9 100644 --- a/app/src/main/res/layout/card_activity_summary.xml +++ b/app/src/main/res/layout/card_activity_summary.xml @@ -86,7 +86,6 @@ android:id="@+id/periodMoreButton" style="@style/SimpleImageButton" android:layout_gravity="center_vertical" - android:contentDescription="@string/a11y_walking_modes" android:src="@drawable/ic_more_vert_black_24dp" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 70e9c23..5582c7a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -370,5 +370,4 @@ Previous Next Start training - Walking modes From 32ca98f8b6c570b93b046ef3d455d603e42672c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20V=C3=A1gner?= Date: Sun, 18 Feb 2024 18:37:19 +0100 Subject: [PATCH 6/6] a11y: Add content description to the walking modes summary button properly this time with no other uneccessary changes --- app/src/main/res/layout/card_activity_summary.xml | 1 + app/src/main/res/values/strings.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/main/res/layout/card_activity_summary.xml b/app/src/main/res/layout/card_activity_summary.xml index f2260e9..98d26df 100644 --- a/app/src/main/res/layout/card_activity_summary.xml +++ b/app/src/main/res/layout/card_activity_summary.xml @@ -86,6 +86,7 @@ android:id="@+id/periodMoreButton" style="@style/SimpleImageButton" android:layout_gravity="center_vertical" + android:contentDescription="@string/a11y_walking_modes" android:src="@drawable/ic_more_vert_black_24dp" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5582c7a..70e9c23 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -370,4 +370,5 @@ Previous Next Start training + Walking modes