Skip to content

Commit

Permalink
actions: better screen readers accessibility (fixes #3226) (#3229)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Mar 12, 2024
1 parent c228b07 commit 3e3ff20
Show file tree
Hide file tree
Showing 16 changed files with 54 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1407
versionName "0.14.7"
versionCode 1408
versionName "0.14.8"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class BellDashboardFragment : BaseDashboardFragment() {

for ((index, entry) in courseCount.withIndex()) {
val star = LayoutInflater.from(activity).inflate(R.layout.image_start, null) as ImageView
star.contentDescription = getString(R.string.completed_course)
val courseId = entry.keys.first()
val count = entry.values.first()
val steps = RealmCourseStep.getSteps(mRealm, courseId)
Expand Down
11 changes: 7 additions & 4 deletions app/src/main/res/layout/app_bar_bell.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
android:layout_gravity="center"
android:padding="@dimen/padding_normal"
android:src="@drawable/ole_logo"
app:tint="@color/md_white_1000" />
app:tint="@color/md_white_1000"
android:contentDescription="@string/menu" />

<TextView
android:id="@+id/app_title_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/padding_normal"
android:paddingRight="65dp"
android:paddingEnd="65dp"
android:text="@string/app_name"
android:textColor="@color/md_white_1000"
android:textSize="@dimen/text_size_large"
Expand All @@ -47,7 +48,8 @@
android:padding="@dimen/padding_small"
android:visibility="gone"
app:srcCompat="@drawable/sync_icon"
app:tint="@color/md_white_1000" />
app:tint="@color/md_white_1000"
android:contentDescription="@string/sync" />

<ImageView
android:id="@+id/iv_setting"
Expand All @@ -57,7 +59,8 @@
android:padding="@dimen/padding_small"
android:visibility="gone"
app:srcCompat="@drawable/settings"
app:tint="@color/md_white_1000" />
app:tint="@color/md_white_1000"
android:contentDescription="@string/settings" />

</LinearLayout>
</androidx.appcompat.widget.Toolbar>
1 change: 1 addition & 0 deletions app/src/main/res/layout/card_profile_bell.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
android:layout_height="40dp"
android:layout_gravity="center"
android:src="@drawable/profile"
android:contentDescription="@string/profile"
app:civ_border_color="@color/colorPrimaryDark"
app:civ_border_width="2dp" />

Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/layout/fragment_home_bell.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
android:layout_height="wrap_content"
android:src="@drawable/ic_progress"
android:tint="@color/md_white_1000"
android:contentDescription="@string/my_activity"
app:fab_label="@string/my_activity" />

<com.github.clans.fab.FloatingActionButton
Expand All @@ -78,6 +79,7 @@
android:layout_height="wrap_content"
android:src="@drawable/ic_progress"
android:tint="@color/md_white_1000"
android:contentDescription="@string/my_progress"
app:fab_label="@string/my_progress" />

<com.github.clans.fab.FloatingActionButton
Expand All @@ -86,13 +88,15 @@
android:layout_height="wrap_content"
android:src="@drawable/notifications"
android:tint="@color/md_white_1000"
android:contentDescription="@string/notifications"
app:fab_label="@string/notifications" />

<com.github.clans.fab.FloatingActionButton
android:id="@+id/fab_survey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_survey"
android:contentDescription="@string/menu_surveys"
android:tint="@color/md_white_1000"
app:fab_label="@string/menu_surveys" />

Expand All @@ -102,6 +106,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/padding_large"
android:contentDescription="@string/add_res"
android:src="@drawable/ic_add"
app:fab_label="@string/add_res" />

Expand All @@ -128,6 +133,7 @@
android:layout_width="@dimen/_30dp"
android:layout_height="@dimen/_30dp"
android:src="@drawable/close_x"
app:tint="@color/md_black_1000" />
app:tint="@color/md_black_1000"
android:contentDescription="@string/close" />
</LinearLayout>
</FrameLayout>
6 changes: 4 additions & 2 deletions app/src/main/res/layout/home_card_courses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
android:layout_height="@dimen/image_size_home_card"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:srcCompat="@drawable/mycourses" />
app:srcCompat="@drawable/mycourses"
android:contentDescription="@string/txt_myCourses" />


<TextView
Expand All @@ -49,7 +50,7 @@
android:id="@+id/count_course"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="right"
android:layout_gravity="end"
android:layout_margin="@dimen/padding_small"
android:background="@drawable/oval_white"
android:gravity="center"
Expand All @@ -64,6 +65,7 @@
<HorizontalScrollView
android:layout_width="0dp"
android:layout_height="match_parent"
android:contentDescription="@string/my_courses"
android:layout_weight="1">

<com.google.android.flexbox.FlexboxLayout
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/home_card_library.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
android:layout_height="@dimen/image_size_home_card"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:srcCompat="@drawable/library" />
app:srcCompat="@drawable/library"
android:contentDescription="@string/my_library" />

<TextView
android:layout_width="match_parent"
Expand All @@ -47,7 +48,7 @@
android:id="@+id/count_library"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="right"
android:layout_gravity="end"
android:layout_margin="@dimen/padding_small"
android:background="@drawable/oval_white"
android:gravity="center"
Expand All @@ -63,6 +64,7 @@
<HorizontalScrollView
android:layout_width="0dp"
android:layout_height="match_parent"
android:contentDescription="@string/txt_myLibrary"
android:layout_weight="1">

<com.google.android.flexbox.FlexboxLayout
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/home_card_mylife.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
android:layout_height="@dimen/image_size_home_card"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:srcCompat="@drawable/meetups" />
app:srcCompat="@drawable/meetups"
android:contentDescription="@string/txt_myLife" />

<TextView
android:layout_width="match_parent"
Expand All @@ -50,6 +51,7 @@

<HorizontalScrollView
android:layout_width="0dp"
android:contentDescription="@string/txt_myLife"
android:layout_height="match_parent"
android:layout_weight="1">

Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/home_card_teams.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
android:layout_height="@dimen/image_size_home_card"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:srcCompat="@drawable/team" />
app:srcCompat="@drawable/team"
android:contentDescription="@string/txt_myTeams" />

<TextView
android:layout_width="match_parent"
Expand All @@ -48,7 +49,7 @@
android:id="@+id/count_team"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="right"
android:layout_gravity="end"
android:layout_margin="@dimen/padding_small"
android:background="@drawable/oval_white"
android:gravity="center"
Expand All @@ -63,6 +64,7 @@

<HorizontalScrollView
android:layout_width="0dp"
android:contentDescription="@string/txt_myTeams"
android:layout_height="match_parent"
android:layout_weight="1">

Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/menu/menu_bell_dashboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,52 @@
android:id="@+id/action_chat"
android:icon="@drawable/chat"
android:title="@string/ai_chat"
android:contentDescription="@string/ai_chat"
app:showAsAction="always" />
<item
android:id="@+id/menu_goOnline"
android:icon="@drawable/goonline"
android:title="@string/user"
android:contentDescription="@string/user"
app:iconTint="@color/material_drawer_accent"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_sync"
android:icon="@drawable/sync_icon"
android:contentDescription="@string/sync_now"
android:title="@string/sync_now"
app:showAsAction="never" />
<item
android:id="@+id/action_feedback"
android:icon="@drawable/ic_feedback"
android:contentDescription="@string/menu_feedback"
android:title="@string/menu_feedback"
app:showAsAction="always" />

<item
android:id="@+id/action_about"
android:icon="@drawable/ic_my_survey"
android:contentDescription="@string/action_about"
android:title="@string/action_about"
app:showAsAction="never" />

<item
android:id="@+id/action_disclaimer"
android:icon="@drawable/ic_my_survey"
android:contentDescription="@string/action_disclaimer"
android:title="@string/action_disclaimer"
app:showAsAction="never" />

<item
android:id="@+id/action_settings"
android:icon="@drawable/settings"
android:contentDescription="@string/action_settings"
android:title="@string/action_settings"
app:showAsAction="never" />
<item
android:id="@+id/action_logout"
android:icon="@drawable/logout"
android:contentDescription="@string/logout"
android:title="@string/logout"
app:showAsAction="never" />
</menu>
2 changes: 2 additions & 0 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -972,5 +972,7 @@
<string name="ob_desc4_4">📚 تفاعلي: تفاعل مع الفيديوهات والكتب والألعاب.</string>
<string name="ob_desc4_5">ابدأ رحلتك التعليمية اللا حدود مع myPlanet!</string>
<string name="recycler_chat_label">محادثات</string>
<string name="completed_course">دورة مكتملة</string>
<string name="menu">القائمة الجانبية</string>

</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -977,5 +977,7 @@
<string name="ob_desc4_4">📚 Interactivo: Involúcrate con vídeos, libros, juegos.</string>
<string name="ob_desc4_5">¡Comienza tu viaje de aprendizaje ilimitado con myPlanet!</string>
<string name="recycler_chat_label">conversaciones</string>
<string name="completed_course">curso completado</string>
<string name="menu">menú lateral</string>

</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -977,5 +977,7 @@
<string name="ob_desc4_4">📚 Interactif : Engagez-vous avec des vidéos, des livres, des jeux.</string>
<string name="ob_desc4_5">Commencez votre parcours d\'apprentissage illimité avec myPlanet!</string>
<string name="recycler_chat_label">conversations</string>
<string name="completed_course">cours terminé</string>
<string name="menu">menu latéral</string>

</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-ne/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -977,5 +977,7 @@
<string name="ob_desc4_4">📚 इन्टर्याक्टिभ: भिडियो, पुस्तकहरू, खेलहरूसँग संलग्न हुनुहोस्।</string>
<string name="ob_desc4_5">मेरो प्ल्यानेटसँग असीमित शिक्षा यात्रा सुरु गर्नुहोस्!</string>
<string name="recycler_chat_label">चर्चाहरू</string>
<string name="completed_course">समाप्त पाठ्यक्रम</string>
<string name="menu">साइड मेนู</string>

</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-so/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -966,5 +966,7 @@
<string name="ob_desc4_4">📚 Isweydaarsan: Iskaashiga filimada, buugagga, ciyaaraha.</string>
<string name="ob_desc4_5">Bilaan ee waxbarasho aan dheeraad ahayn soo bila myPlanet!</string>
<string name="recycler_chat_label">dhaqameed</string>
<string name="completed_course">koorso la dhammaaday</string>
<string name="menu">liiska dhinaca</string>

</resources>
4 changes: 3 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1067,5 +1067,7 @@
<string name="ob_desc4_4">📚 Interactive: Engage with videos, books, games.</string>
<string name="ob_desc4_5">Begin your limitless learning journey with myPlanet!</string>
<string name="recycler_chat_label">conversations</string>

<string name="completed_course">completed course</string>
<string name="menu">side menu</string>

</resources>

0 comments on commit 3e3ff20

Please sign in to comment.