mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 23:58:47 +01:00
Merge pull request #3772 from pvagner/voiceMessageA11Y
Improve accessibility of voice messages
This commit is contained in:
commit
b1b5ff8a09
@ -504,12 +504,14 @@ class VoiceMessageRecorderView : ConstraintLayout, VoiceMessagePlaybackTracker.L
|
||||
views.voiceMessagePlaybackTimerIndicator.isVisible = true
|
||||
views.voicePlaybackControlButton.isVisible = false
|
||||
views.voiceMessageSendButton.isVisible = true
|
||||
views.voicePlaybackWaveform.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_YES
|
||||
renderToast(context.getString(R.string.voice_message_tap_to_stop_toast))
|
||||
}
|
||||
|
||||
private fun showPlaybackViews() {
|
||||
views.voiceMessagePlaybackTimerIndicator.isVisible = false
|
||||
views.voicePlaybackControlButton.isVisible = true
|
||||
views.voicePlaybackWaveform.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO
|
||||
callback?.onVoiceRecordingPlaybackModeOn()
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:importantForAccessibility="no"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/voicePlaybackTime"
|
||||
@ -77,4 +78,4 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/voicePlaybackLayout"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -107,7 +107,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="28dp"
|
||||
android:contentDescription="@string/a11y_lock_voice_message"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/ic_voice_message_unlocked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@id/voiceMessageMicButton"
|
||||
@ -215,6 +215,8 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:contentDescription="@string/a11y_stop_voice_message"
|
||||
android:importantForAccessibility="no"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/voicePlaybackTime"
|
||||
@ -231,10 +233,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="84dp"
|
||||
android:visibility="gone"
|
||||
android:accessibilityLiveRegion="polite"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="@string/voice_message_release_to_send_toast"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -3577,13 +3577,14 @@
|
||||
<string name="error_failed_to_join_room">Sorry, an error occurred while trying to join: %s</string>
|
||||
<string name="call_jitsi_started">Group call started</string>
|
||||
|
||||
<string name="a11y_start_voice_message">Start Voice Message</string>
|
||||
<string name="a11y_start_voice_message">Record Voice Message</string>
|
||||
<string name="voice_message_slide_to_cancel">Slide to cancel</string>
|
||||
<string name="a11y_lock_voice_message">Voice Message Lock</string>
|
||||
<string name="a11y_play_voice_message">Play Voice Message</string>
|
||||
<string name="a11y_pause_voice_message">Pause Voice Message</string>
|
||||
<string name="a11y_stop_voice_message">Stop Recording</string>
|
||||
<string name="a11y_recording_voice_message">Recording voice message</string>
|
||||
<string name="a11y_delete_recorded_voice_message">Delete recorded voice message</string>
|
||||
<string name="a11y_delete_recorded_voice_message">Delete recording</string>
|
||||
<string name="voice_message_release_to_send_toast">Hold to record, release to send</string>
|
||||
<string name="voice_message_n_seconds_warning_toast">%1$ds left</string>
|
||||
<string name="voice_message_tap_to_stop_toast">Tap on your recording to stop or listen</string>
|
||||
|
Loading…
Reference in New Issue
Block a user