mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Merge pull request #6827 from element-hq/feature/bma/a11y/roomNameHeading
[a11y] Improve accessibility of screen headers.
This commit is contained in:
+11
-3
@@ -55,6 +55,8 @@ import androidx.compose.ui.layout.onVisibilityChanged
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.platform.LocalInspectionMode
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.clearAndSetSemantics
|
||||
import androidx.compose.ui.semantics.contentDescription
|
||||
import androidx.compose.ui.semantics.heading
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
@@ -495,14 +497,20 @@ private fun MediaViewerTopBar(
|
||||
TopAppBar(
|
||||
title = {
|
||||
if (senderName != null && dateSent != null) {
|
||||
val description = stringResource(
|
||||
CommonStrings.a11y_sent_by_sender_at_date,
|
||||
senderName,
|
||||
dateSent,
|
||||
)
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.clearAndSetSemantics {
|
||||
heading()
|
||||
contentDescription = description
|
||||
},
|
||||
) {
|
||||
Text(
|
||||
modifier = Modifier.semantics {
|
||||
heading()
|
||||
},
|
||||
text = senderName,
|
||||
style = ElementTheme.typography.fontBodyMdMedium,
|
||||
color = ElementTheme.colors.textPrimary,
|
||||
|
||||
Reference in New Issue
Block a user