diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/IncidenceAndHospitalizationCard.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/IncidenceAndHospitalizationCard.kt index bd2ac237a87..a0d4c2b8931 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/IncidenceAndHospitalizationCard.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/IncidenceAndHospitalizationCard.kt @@ -9,7 +9,6 @@ import de.rki.coronawarnapp.statistics.ui.homecards.StatisticsCardAdapter import de.rki.coronawarnapp.statistics.util.formatStatisticalValue import de.rki.coronawarnapp.statistics.util.getContentDescriptionForTrends import de.rki.coronawarnapp.statistics.util.getLocalizedSpannableString -import de.rki.coronawarnapp.util.StringBuilderExtension.appendWithLineBreak import de.rki.coronawarnapp.util.StringBuilderExtension.appendWithTrailingSpace import de.rki.coronawarnapp.util.formatter.getPrimaryLabel import de.rki.coronawarnapp.util.formatter.getSecondaryLabel @@ -98,8 +97,8 @@ class IncidenceAndHospitalizationCard(parent: ViewGroup) : ): StringBuilder { return StringBuilder() .appendWithTrailingSpace(context.getString(R.string.accessibility_statistics_card_announcement)) - .appendWithLineBreak(context.getString(R.string.statistics_explanation_seven_day_incidence_title)) - .appendWithLineBreak(context.getString(R.string.statistics_seven_day_hospitalization_nationwide_text)) + .appendWithTrailingSpace(context.getString(R.string.statistics_explanation_seven_day_incidence_title)) + .appendWithTrailingSpace(context.getString(R.string.statistics_seven_day_hospitalization_nationwide_text)) .appendWithTrailingSpace(item.getPrimaryLabel(context)) .appendWithTrailingSpace( formatStatisticalValue( @@ -109,8 +108,8 @@ class IncidenceAndHospitalizationCard(parent: ViewGroup) : ) ) .appendWithTrailingSpace(context.getString(R.string.statistics_card_incidence_value_description)) - .appendWithLineBreak(getContentDescriptionForTrends(context, sevenDayIncidence.trend)) - .appendWithLineBreak(context.getString(R.string.statistics_seven_day_hospitalization_card_title)) + .appendWithTrailingSpace(getContentDescriptionForTrends(context, sevenDayIncidence.trend)) + .appendWithTrailingSpace(context.getString(R.string.statistics_seven_day_hospitalization_card_title)) .appendWithTrailingSpace( getSecondaryLabel(context, Instant.ofEpochSecond(sevenDayIncidenceSecondary.updatedAt)) ) @@ -121,7 +120,7 @@ class IncidenceAndHospitalizationCard(parent: ViewGroup) : sevenDayIncidenceSecondary.decimals ) ) - .appendWithLineBreak(getContentDescriptionForTrends(context, sevenDayIncidenceSecondary.trend)) - .append(context.getString(R.string.accessibility_statistics_card_navigation_information)) + .appendWithTrailingSpace(getContentDescriptionForTrends(context, sevenDayIncidenceSecondary.trend)) + .appendWithTrailingSpace(context.getString(R.string.accessibility_statistics_card_navigation_information)) } } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/LinkViewCard.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/LinkViewCard.kt index 0d88f62aea3..1624fe7b1df 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/LinkViewCard.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/LinkViewCard.kt @@ -5,6 +5,7 @@ import androidx.core.view.isGone import de.rki.coronawarnapp.R import de.rki.coronawarnapp.databinding.HomeStatisticsCardsLinkCardLayoutBinding import de.rki.coronawarnapp.statistics.ui.homecards.StatisticsCardAdapter +import de.rki.coronawarnapp.util.StringBuilderExtension.appendWithTrailingSpace class LinkViewCard(parent: ViewGroup) : StatisticsCardAdapter.ItemVH( @@ -30,8 +31,15 @@ class LinkViewCard(parent: ViewGroup) : } else { itemView.layoutParams.width = context.resources.getDimensionPixelSize(R.dimen.width_300) } + cardLinkContainer.contentDescription = buildAccessibilityString() infoStatistics.isGone = curItem.isEol infoStatistics.setOnClickListener { curItem.onClickListener(curItem.linkStats) } linkButton.setOnClickListener { curItem.openLink(curItem.linkStats.url) } } + + private fun buildAccessibilityString() = StringBuilder() + .appendWithTrailingSpace(context.getString(R.string.pandemic_radar_card_title)) + .appendWithTrailingSpace(context.getString(R.string.pandemic_radar_card_subtitle)) + .appendWithTrailingSpace(context.getString(R.string.pandemic_radar_card_message)) + .appendWithTrailingSpace(context.getString(R.string.pandemic_Radar_card_button_text)) } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragment.kt index 6323cd6943e..cfe79f8d8f0 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/home/HomeFragment.kt @@ -7,7 +7,6 @@ import android.text.SpannableString import android.text.style.ImageSpan import android.view.Menu import android.view.View -import android.view.accessibility.AccessibilityEvent import androidx.core.view.isGone import androidx.fragment.app.Fragment import androidx.navigation.fragment.findNavController @@ -144,7 +143,6 @@ class HomeFragment : Fragment(R.layout.home_fragment_layout), AutoInject { super.onResume() viewModel.refreshTests() viewModel.initAppShortcuts() - binding.container.sendAccessibilityEvent(AccessibilityEvent.TYPE_ANNOUNCEMENT) } private fun menuIconWithText(drawable: Drawable?, title: CharSequence): CharSequence { diff --git a/Corona-Warn-App/src/main/res/layout/home_statistics_scrollcontainer.xml b/Corona-Warn-App/src/main/res/layout/home_statistics_scrollcontainer.xml index 492a62886de..e9739f2577f 100644 --- a/Corona-Warn-App/src/main/res/layout/home_statistics_scrollcontainer.xml +++ b/Corona-Warn-App/src/main/res/layout/home_statistics_scrollcontainer.xml @@ -1,5 +1,7 @@