mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 00:01:00 +00:00
VoiceOver improvements
This commit is contained in:
parent
0f53a1b676
commit
48c014ba35
3 changed files with 7 additions and 12 deletions
|
@ -91,8 +91,7 @@
|
|||
"compose.poll-button.accessibility-label" = "Add a poll";
|
||||
"compose.prompt" = "What's on your mind?";
|
||||
"compose.take-photo-or-video" = "Take Photo or Video";
|
||||
"compose.visibility-button.accessibility-label.toot" = "Adjust toot privacy";
|
||||
"compose.visibility-button.accessibility-label.post" = "Adjust post privacy";
|
||||
"compose.visibility-button.accessibility-label-%@" = "Privacy: %@";
|
||||
"compose-button.accessibility-label.post" = "Compose Post";
|
||||
"compose-button.accessibility-label.toot" = "Compose Toot";
|
||||
"emoji.custom" = "Custom";
|
||||
|
|
|
@ -83,15 +83,6 @@ private extension CompositionInputAccessoryView {
|
|||
image: UIImage(systemName: parentViewModel.visibility.systemImageName),
|
||||
menu: visibilityMenu(selectedVisibility: parentViewModel.visibility))
|
||||
|
||||
switch parentViewModel.identityContext.appPreferences.statusWord {
|
||||
case .toot:
|
||||
visibilityButton.accessibilityLabel =
|
||||
NSLocalizedString("compose.visibility-button.accessibility-label.toot", comment: "")
|
||||
case .post:
|
||||
visibilityButton.accessibilityLabel =
|
||||
NSLocalizedString("compose.visibility-button.accessibility-label.post", comment: "")
|
||||
}
|
||||
|
||||
let contentWarningButton = UIBarButtonItem(
|
||||
title: NSLocalizedString("status.content-warning-abbreviation", comment: ""),
|
||||
primaryAction: UIAction { [weak self] _ in self?.viewModel.displayContentWarning.toggle() })
|
||||
|
@ -183,6 +174,9 @@ private extension CompositionInputAccessoryView {
|
|||
.sink { [weak self] in
|
||||
visibilityButton.image = UIImage(systemName: $0.systemImageName)
|
||||
visibilityButton.menu = self?.visibilityMenu(selectedVisibility: $0)
|
||||
visibilityButton.accessibilityLabel = String.localizedStringWithFormat(
|
||||
NSLocalizedString("compose.visibility-button.accessibility-label-%@", comment: ""),
|
||||
$0.title ?? "")
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
|
|
@ -400,6 +400,8 @@ private extension StatusView {
|
|||
infoLabel.isHidden = false
|
||||
infoIcon.isHidden = false
|
||||
} else {
|
||||
infoLabel.text = nil
|
||||
infoIcon.image = nil
|
||||
infoLabel.isHidden = true
|
||||
infoIcon.isHidden = true
|
||||
}
|
||||
|
@ -494,7 +496,7 @@ private extension StatusView {
|
|||
|
||||
let accessibilityAttributedLabel = NSMutableAttributedString(string: "")
|
||||
|
||||
if let infoText = infoLabel.attributedText {
|
||||
if !infoLabel.isHidden, let infoText = infoLabel.attributedText {
|
||||
accessibilityAttributedLabel.appendWithSeparator(infoText)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue