mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
Merge pull request #7787 from element-hq/mauroromito/add_accessibility_to_rte_toggle_size_button
This commit is contained in:
@@ -2603,6 +2603,8 @@ To enable access, tap Settings> Location and select Always";
|
||||
|
||||
|
||||
// MARK: - WYSIWYG Composer
|
||||
"wysiwyg_composer_action_minimise_action" = "Shrink composer";
|
||||
"wysiwyg_composer_action_maximise_action" = "Expand composer";
|
||||
|
||||
// Send Media Actions
|
||||
"wysiwyg_composer_start_action_media_picker" = "Photo Library";
|
||||
|
||||
@@ -9567,6 +9567,14 @@ public class VectorL10n: NSObject {
|
||||
public static var widgetStickerPickerNoStickerpacksAlertAddNow: String {
|
||||
return VectorL10n.tr("Vector", "widget_sticker_picker_no_stickerpacks_alert_add_now")
|
||||
}
|
||||
/// Expand composer
|
||||
public static var wysiwygComposerActionMaximiseAction: String {
|
||||
return VectorL10n.tr("Vector", "wysiwyg_composer_action_maximise_action")
|
||||
}
|
||||
/// Shrink composer
|
||||
public static var wysiwygComposerActionMinimiseAction: String {
|
||||
return VectorL10n.tr("Vector", "wysiwyg_composer_action_minimise_action")
|
||||
}
|
||||
/// Apply bold format
|
||||
public static var wysiwygComposerFormatActionBold: String {
|
||||
return VectorL10n.tr("Vector", "wysiwyg_composer_format_action_bold")
|
||||
|
||||
@@ -82,6 +82,10 @@ struct Composer: View {
|
||||
wysiwygViewModel.maximised ? "minimiseButton" : "maximiseButton"
|
||||
}
|
||||
|
||||
private var toggleButtonAccessibilityLabel: String {
|
||||
wysiwygViewModel.maximised ? VectorL10n.wysiwygComposerActionMinimiseAction : VectorL10n.wysiwygComposerActionMaximiseAction
|
||||
}
|
||||
|
||||
private var toggleButtonImageName: String {
|
||||
wysiwygViewModel.maximised ? Asset.Images.minimiseComposer.name : Asset.Images.maximiseComposer.name
|
||||
}
|
||||
@@ -171,6 +175,7 @@ struct Composer: View {
|
||||
.frame(width: 16, height: 16)
|
||||
}
|
||||
.accessibilityIdentifier(toggleButtonAcccessibilityIdentifier)
|
||||
.accessibilityLabel(toggleButtonAccessibilityLabel)
|
||||
.padding(.leading, 12)
|
||||
.padding(.trailing, 4)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user