Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Onboarding Share Data - improve accessibility (EXPOSUREAPP-7540) #4688

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class OnboardingAnalyticsFragment : Fragment(R.layout.fragment_onboarding_ppa),
}
viewModel.ageGroup.observe2(this) {
binding.ageGroupRowBody.text = getString(it.labelStringRes)
binding.ageGroupRow.contentDescription =
getString(R.string.onboarding_ppa_age_title) + getString(it.labelStringRes)
}
viewModel.federalState.observe2(this) {
binding.districtRow.visibility = if (it != PpaData.PPAFederalState.FEDERAL_STATE_UNSPECIFIED) {
Expand All @@ -70,10 +72,14 @@ class OnboardingAnalyticsFragment : Fragment(R.layout.fragment_onboarding_ppa),
View.GONE
}
binding.federalStateRowBody.text = getString(it.labelStringRes)
binding.federalStateRow.contentDescription =
getString(R.string.onboarding_ppa_state_title) + getString(it.labelStringRes)
}
viewModel.district.observe2(this) {
binding.districtRowBody.text = it?.districtName
?: getString(R.string.analytics_userinput_district_unspecified)
binding.districtRow.contentDescription =
getString(R.string.onboarding_ppa_district_title) + binding.districtRowBody.text
}
}

Expand Down
46 changes: 24 additions & 22 deletions Corona-Warn-App/src/main/res/layout/fragment_onboarding_ppa.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
android:id="@+id/onboarding_ppa_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription=""
android:accessibilityLiveRegion="assertive"
android:contentDescription="@string/onboarding_ppa_headline"
android:fillViewport="true"
android:focusable="true">

Expand Down Expand Up @@ -86,9 +87,12 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/federal_state_row"
style="@style/row"
android:layout_marginTop="28dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="28dp"
android:accessibilityLiveRegion="polite"
android:contentDescription="@string/onboarding_ppa_state_title"
android:focusable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/onboarding_body_short">
Expand All @@ -98,7 +102,6 @@
style="@style/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:focusable="true"
android:text="@string/onboarding_ppa_state_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -110,8 +113,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_mega_tiny"
android:accessibilityLiveRegion="assertive"
android:focusable="true"
android:text="@string/onboarding_ppa_state_title"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -135,6 +136,9 @@
style="@style/row"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:accessibilityLiveRegion="polite"
android:contentDescription="@string/onboarding_ppa_district_title"
android:focusable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/federal_state_row">
Expand All @@ -144,7 +148,6 @@
style="@style/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:focusable="true"
android:text="@string/onboarding_ppa_district_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -156,8 +159,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_mega_tiny"
android:accessibilityLiveRegion="assertive"
android:focusable="true"
android:text="@string/onboarding_ppa_district_title"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -181,6 +182,9 @@
style="@style/row"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:accessibilityLiveRegion="polite"
android:contentDescription="@string/onboarding_ppa_age_title"
android:focusable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/district_row">
Expand All @@ -190,7 +194,6 @@
style="@style/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:focusable="true"
android:text="@string/onboarding_ppa_age_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -202,8 +205,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_mega_tiny"
android:accessibilityLiveRegion="assertive"
android:focusable="true"
android:text="@string/onboarding_ppa_age_title"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down Expand Up @@ -286,15 +287,15 @@
app:layout_constraintStart_toStartOf="@id/bullet_point_consent"
app:layout_constraintTop_toBottomOf="@+id/legal_body" />

<ImageView
<ImageView
android:id="@+id/bullet_point_consent"
android:layout_width="@dimen/bullet_point_size"
android:layout_height="@dimen/bullet_point_size"
android:layout_marginTop="@dimen/spacing_tiny"
android:importantForAccessibility="no"
app:srcCompat="@drawable/bullet_point"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/legal_point_consent" />
app:layout_constraintTop_toTopOf="@id/legal_point_consent"
app:srcCompat="@drawable/bullet_point" />

<TextView
android:id="@+id/legal_point_identity"
Expand All @@ -309,15 +310,15 @@
app:layout_constraintStart_toStartOf="@id/bullet_point_consent"
app:layout_constraintTop_toBottomOf="@+id/legal_point_consent" />

<ImageView
<ImageView
android:id="@+id/bullet_point_identity"
android:layout_width="@dimen/bullet_point_size"
android:layout_height="@dimen/bullet_point_size"
android:layout_marginTop="@dimen/spacing_tiny"
android:importantForAccessibility="no"
app:srcCompat="@drawable/bullet_point"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/legal_point_identity" />
app:layout_constraintTop_toTopOf="@id/legal_point_identity"
app:srcCompat="@drawable/bullet_point" />

<TextView
android:id="@+id/legal_point_sixteen"
Expand All @@ -332,24 +333,26 @@
app:layout_constraintStart_toStartOf="@id/bullet_point_consent"
app:layout_constraintTop_toBottomOf="@+id/legal_point_identity" />

<ImageView
<ImageView
android:id="@+id/bullet_point_sixteen"
android:layout_width="@dimen/bullet_point_size"
android:layout_height="@dimen/bullet_point_size"
android:layout_marginTop="@dimen/spacing_tiny"
android:importantForAccessibility="no"
app:srcCompat="@drawable/bullet_point"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/legal_point_sixteen" />
app:layout_constraintTop_toTopOf="@id/legal_point_sixteen"
app:srcCompat="@drawable/bullet_point" />

</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/more_info_row"
style="@style/row"
android:layout_marginTop="22dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="22dp"
android:contentDescription="@string/onboarding_ppa_more_info_title"
android:focusable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/consent_layout">
Expand All @@ -359,7 +362,6 @@
style="@style/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:focusable="true"
android:text="@string/onboarding_ppa_more_info_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down