From b0aaa439615e85a33dbc7d43bbb485b21f692eb5 Mon Sep 17 00:00:00 2001 From: DreVla Date: Tue, 14 Feb 2023 16:37:31 +0200 Subject: [PATCH] Bug 1813877 - Announce page title with talkback when swiping on navbar Talkback now announces the name of the tab switched to using swipe left or right gestures on the navbar (cherry picked from commit ce68e6f88e8bbfe096f4843c6f393f259dde6248) --- .../main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt | 3 +++ app/src/main/res/layout/fragment_browser.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt index b119935c0b..89062bcb37 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt @@ -143,6 +143,7 @@ import org.mozilla.fenix.onboarding.FenixOnboarding import org.mozilla.fenix.perf.MarkersFragmentLifecycleCallbacks import org.mozilla.fenix.settings.SupportUtils import org.mozilla.fenix.settings.biometric.BiometricPromptFeature +import org.mozilla.fenix.tabstray.ext.toDisplayTitle import org.mozilla.fenix.theme.ThemeManager import org.mozilla.fenix.utils.allowUndo import org.mozilla.fenix.wifi.SitePermissionsWifiIntegration @@ -1135,6 +1136,8 @@ abstract class BaseBrowserFragment : updateThemeForSession(selectedTab) } + binding.engineView.asView().contentDescription = selectedTab.toDisplayTitle() + if (browserInitialized) { view?.let { fullScreenChanged(false) diff --git a/app/src/main/res/layout/fragment_browser.xml b/app/src/main/res/layout/fragment_browser.xml index a37f8d5a9f..a2d58244f3 100644 --- a/app/src/main/res/layout/fragment_browser.xml +++ b/app/src/main/res/layout/fragment_browser.xml @@ -32,6 +32,7 @@ android:id="@+id/engineView" android:layout_width="match_parent" android:layout_height="match_parent" + android:accessibilityLiveRegion="polite" android:visibility="gone" />