[Android] Accessibility: improve talkback for the video player seek actions
Nicolas Pomepuy
git at videolan.org
Fri Jun 3 11:30:22 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Jun 1 10:58:16 2022 +0200| [ba593ad2a4a6fbfd2813d865ef4b023da67fb2b2] | committer: Nicolas Pomepuy
Accessibility: improve talkback for the video player seek actions
> https://code.videolan.org/videolan/vlc-android/commit/ba593ad2a4a6fbfd2813d865ef4b023da67fb2b2
---
application/vlc-android/res/layout/player_hud.xml | 4 ++--
.../src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/application/vlc-android/res/layout/player_hud.xml b/application/vlc-android/res/layout/player_hud.xml
index 8f47e31ca..bfa06db98 100644
--- a/application/vlc-android/res/layout/player_hud.xml
+++ b/application/vlc-android/res/layout/player_hud.xml
@@ -370,7 +370,6 @@
android:layout_marginEnd="@dimen/large_margins_center"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
- android:contentDescription="@string/playback_rewind"
android:focusable="true"
android:longClickable="true"
android:scaleType="center"
@@ -388,6 +387,7 @@
android:layout_height="wrap_content"
android:textColor="?attr/player_icon_color"
android:visibility="gone"
+ android:importantForAccessibility="no"
tools:visibility="visible"
android:textSize="8dp"
android:textStyle="bold"
@@ -420,7 +420,6 @@
android:layout_marginStart="@dimen/large_margins_center"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
- android:contentDescription="@string/playback_forward"
android:focusable="true"
android:longClickable="true"
android:scaleType="center"
@@ -441,6 +440,7 @@
android:visibility="gone"
tools:visibility="visible"
android:textSize="8dp"
+ android:importantForAccessibility="no"
android:textStyle="bold"
vlc:layout_constraintBottom_toBottomOf="@+id/player_overlay_forward"
vlc:layout_constraintEnd_toEndOf="@+id/player_overlay_forward"
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
index b94e25573..05871a3da 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
@@ -802,9 +802,11 @@ class VideoPlayerOverlayDelegate (private val player: VideoPlayerActivity) {
if (seekButtons) {
hudBinding.playerOverlayRewind.visibility = if (show) View.VISIBLE else View.INVISIBLE
hudBinding.playerOverlayRewindText.text = "${Settings.videoJumpDelay}"
+ hudBinding.playerOverlayRewind.contentDescription = player.getString(R.string.talkback_action_rewind, Settings.videoJumpDelay.toString())
hudBinding.playerOverlayRewindText.visibility = if (show) View.VISIBLE else View.INVISIBLE
hudBinding.playerOverlayForward.visibility = if (show) View.VISIBLE else View.INVISIBLE
hudBinding.playerOverlayForwardText.text = "${Settings.videoJumpDelay}"
+ hudBinding.playerOverlayForward.contentDescription = player.getString(R.string.talkback_action_forward, Settings.videoJumpDelay.toString())
hudBinding.playerOverlayForwardText.visibility = if (show) View.VISIBLE else View.INVISIBLE
}
hudBinding.playerOverlayTracks.visibility = if (show) View.VISIBLE else View.INVISIBLE
More information about the Android
mailing list