mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Merge pull request #4943 from element-hq/feature/bma/a11yDeleteFilters
a11y: improve content description of the close buttons
This commit is contained in:
+2
-1
@@ -40,6 +40,7 @@ import androidx.compose.ui.unit.dp
|
|||||||
import androidx.compose.ui.zIndex
|
import androidx.compose.ui.zIndex
|
||||||
import io.element.android.compound.theme.ElementTheme
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.compound.tokens.generated.CompoundIcons
|
import io.element.android.compound.tokens.generated.CompoundIcons
|
||||||
|
import io.element.android.features.roomlist.impl.R
|
||||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||||
@@ -147,7 +148,7 @@ private fun RoomListClearFiltersButton(
|
|||||||
modifier = Modifier.align(Alignment.Center),
|
modifier = Modifier.align(Alignment.Center),
|
||||||
imageVector = CompoundIcons.Close(),
|
imageVector = CompoundIcons.Close(),
|
||||||
tint = ElementTheme.colors.iconOnSolidPrimary,
|
tint = ElementTheme.colors.iconOnSolidPrimary,
|
||||||
contentDescription = stringResource(id = io.element.android.libraries.ui.strings.R.string.action_clear),
|
contentDescription = stringResource(id = R.string.screen_roomlist_clear_filters),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
<string name="screen_migration_message">"This is a one time process, thanks for waiting."</string>
|
<string name="screen_migration_message">"This is a one time process, thanks for waiting."</string>
|
||||||
<string name="screen_migration_title">"Setting up your account."</string>
|
<string name="screen_migration_title">"Setting up your account."</string>
|
||||||
<string name="screen_roomlist_a11y_create_message">"Create a new conversation or room"</string>
|
<string name="screen_roomlist_a11y_create_message">"Create a new conversation or room"</string>
|
||||||
|
<string name="screen_roomlist_clear_filters">"Clear filters"</string>
|
||||||
<string name="screen_roomlist_empty_message">"Get started by messaging someone."</string>
|
<string name="screen_roomlist_empty_message">"Get started by messaging someone."</string>
|
||||||
<string name="screen_roomlist_empty_title">"No chats yet."</string>
|
<string name="screen_roomlist_empty_title">"No chats yet."</string>
|
||||||
<string name="screen_roomlist_filter_favourites">"Favourites"</string>
|
<string name="screen_roomlist_filter_favourites">"Favourites"</string>
|
||||||
|
|||||||
+13
-11
@@ -178,17 +178,19 @@ fun TextComposer(
|
|||||||
remember(state.richTextEditorState, composerMode, onResetComposerMode, onError) {
|
remember(state.richTextEditorState, composerMode, onResetComposerMode, onError) {
|
||||||
@Composable {
|
@Composable {
|
||||||
TextInputBox(
|
TextInputBox(
|
||||||
modifier = Modifier.clickable(
|
modifier = Modifier
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
.clickable(
|
||||||
indication = null,
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
) {
|
indication = null,
|
||||||
coroutineScope.launch {
|
) {
|
||||||
state.requestFocus()
|
coroutineScope.launch {
|
||||||
view.showKeyboard()
|
state.requestFocus()
|
||||||
|
view.showKeyboard()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.semantics {
|
.semantics {
|
||||||
hideFromAccessibility()
|
hideFromAccessibility()
|
||||||
},
|
},
|
||||||
composerMode = composerMode,
|
composerMode = composerMode,
|
||||||
onResetComposerMode = onResetComposerMode,
|
onResetComposerMode = onResetComposerMode,
|
||||||
isTextEmpty = state.richTextEditorState.messageHtml.isEmpty(),
|
isTextEmpty = state.richTextEditorState.messageHtml.isEmpty(),
|
||||||
@@ -317,7 +319,7 @@ fun TextComposer(
|
|||||||
IconColorButton(
|
IconColorButton(
|
||||||
onClick = onDismissTextFormatting,
|
onClick = onDismissTextFormatting,
|
||||||
imageVector = CompoundIcons.Close(),
|
imageVector = CompoundIcons.Close(),
|
||||||
contentDescription = stringResource(CommonStrings.action_close),
|
contentDescription = stringResource(R.string.rich_text_editor_close_formatting_options),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
textFormatting = textFormattingOptions,
|
textFormatting = textFormattingOptions,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
<string name="rich_text_editor_a11y_add_attachment">"Add attachment"</string>
|
<string name="rich_text_editor_a11y_add_attachment">"Add attachment"</string>
|
||||||
<string name="rich_text_editor_bullet_list">"Toggle bullet list"</string>
|
<string name="rich_text_editor_bullet_list">"Toggle bullet list"</string>
|
||||||
<string name="rich_text_editor_close_formatting_options">"Close formatting options"</string>
|
<string name="rich_text_editor_close_formatting_options">"Cancel and close text formatting"</string>
|
||||||
<string name="rich_text_editor_code_block">"Toggle code block"</string>
|
<string name="rich_text_editor_code_block">"Toggle code block"</string>
|
||||||
<string name="rich_text_editor_composer_caption_placeholder">"Add a caption"</string>
|
<string name="rich_text_editor_composer_caption_placeholder">"Add a caption"</string>
|
||||||
<string name="rich_text_editor_composer_encrypted_placeholder">"Encrypted message…"</string>
|
<string name="rich_text_editor_composer_encrypted_placeholder">"Encrypted message…"</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user