Skip to content
Snippets Groups Projects
Unverified Commit fefae56d authored by axelherbstreith's avatar axelherbstreith Committed by GitHub
Browse files

Contact Journal Day Screen Accessibility (EXPOSUREAPP-5134) (#2391)

* updated floating action button accessibility

* linting

* changed description
parent feb8c9b2
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,8 @@ class ContactDiaryDayFragment : Fragment(R.layout.contact_diary_day_fragment), A
binding.apply {
contactDiaryDayViewPager.registerOnPageChangeCallback {
binding.contactDiaryDayFab.setText(adapter.tabs[it].fabTextResource)
binding.contactDiaryDayFab.text = getString(adapter.tabs[it].fabTextResource)
binding.contactDiaryDayFab.contentDescription = getString(adapter.tabs[it].fabTextResourceAccessibility)
}
contactDiaryDayFab.setOnClickListener {
......
......@@ -10,11 +10,13 @@ import de.rki.coronawarnapp.contactdiary.ui.day.tabs.person.ContactDiaryPersonLi
sealed class ContactDiaryDayTab(
val tabNameResource: Int,
val fabTextResource: Int,
val fabTextResourceAccessibility: Int,
val fragmentInstantiation: (day: String) -> Fragment
) {
object PersonTab : ContactDiaryDayTab(
R.string.contact_diary_day_person_tab_title,
R.string.contact_diary_day_person_fab_title,
R.string.accessibility_day_add_person,
{ day ->
ContactDiaryPersonListFragment().apply {
// Feels kind of hacky but i like the free typesafety for the args
......@@ -26,6 +28,7 @@ sealed class ContactDiaryDayTab(
object LocationTab : ContactDiaryDayTab(
R.string.contact_diary_day_location_tab_title,
R.string.contact_diary_day_location_fab_title,
R.string.accessibility_day_add_location,
{ day ->
ContactDiaryLocationListFragment().apply {
// Feels kind of hacky but i like the free typesafety for the args
......
......@@ -134,6 +134,11 @@
<!-- XTXT: Edit (description for screen readers) -->
<string name="accessibility_edit">"Bearbeiten"</string>
<!-- XACT: Add Person Button (description for screen readers) -->
<string name="accessibility_day_add_person">"Person hinzufügen"</string>
<!-- XACT: Add Location Button (description for screen readers) -->
<string name="accessibility_day_add_location">"Ort hinzufügen"</string>
<!-- XBUT: Option - person encounter - below 15 Min -->
<string name="contact_diary_person_encounter_duration_below_15_min">unter 15 Min</string>
<!-- XBUT: Option - person encounter - above 15 Min -->
......
......@@ -141,6 +141,11 @@
<!-- XTXT: Edit (description for screen readers) -->
<string name="accessibility_edit">"Edit"</string>
<!-- XACT: Add Person Button (description for screen readers) -->
<string name="accessibility_day_add_person">""</string>
<!-- XACT: Add Location Button (description for screen readers) -->
<string name="accessibility_day_add_location">""</string>
<!-- XBUT: Option - person encounter - below 15 Min -->
<string name="contact_diary_person_encounter_duration_below_15_min">unter 15 Min</string>
<!-- XBUT: Option - person encounter - above 15 Min -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment