VoiceOver improvement
This commit is contained in:
parent
f4e9f26df4
commit
97bd008ea3
|
@ -268,8 +268,6 @@
|
|||
"status.bookmark" = "Bookmark";
|
||||
"status.content-warning-abbreviation" = "CW";
|
||||
"status.content-warning.accessibility" = "Content warning";
|
||||
"status.content-warning.accessibility.closed" = "Closed";
|
||||
"status.content-warning.accessibility.opened" = "Opened";
|
||||
"status.delete" = "Delete";
|
||||
"status.delete.confirm.post" = "Are you sure you want to delete this post?";
|
||||
"status.delete.confirm.toot" = "Are you sure you want to delete this toot?";
|
||||
|
|
|
@ -67,6 +67,8 @@ final class StatusView: UIView {
|
|||
if !statusConfiguration.viewModel.shouldShowContent {
|
||||
statusConfiguration.viewModel.toggleShowContent()
|
||||
|
||||
UIAccessibility.post(notification: .screenChanged, argument: self)
|
||||
|
||||
return true
|
||||
} else {
|
||||
return super.accessibilityActivate()
|
||||
|
|
|
@ -63,29 +63,13 @@ final class StatusBodyView: UIView {
|
|||
|
||||
let accessibilityAttributedLabel = NSMutableAttributedString(string: "")
|
||||
|
||||
if !spoilerTextLabel.isHidden {
|
||||
accessibilityAttributedLabel.append(mutableSpoilerText)
|
||||
}
|
||||
|
||||
if !toggleShowContentButton.isHidden {
|
||||
if !spoilerTextLabel.isHidden, !viewModel.shouldShowContent {
|
||||
accessibilityAttributedLabel.appendWithSeparator(
|
||||
NSLocalizedString("status.content-warning.accessibility", comment: ""))
|
||||
|
||||
if viewModel.shouldShowContent {
|
||||
accessibilityAttributedLabel.appendWithSeparator(
|
||||
NSLocalizedString("status.content-warning.accessibility.opened", comment: ""))
|
||||
} else {
|
||||
accessibilityAttributedLabel.appendWithSeparator(
|
||||
NSLocalizedString("status.content-warning.accessibility.closed", comment: ""))
|
||||
}
|
||||
}
|
||||
|
||||
if !contentTextView.isHidden {
|
||||
if spoilerTextLabel.isHidden {
|
||||
accessibilityAttributedLabel.append(mutableContent)
|
||||
} else {
|
||||
accessibilityAttributedLabel.appendWithSeparator(mutableContent)
|
||||
}
|
||||
accessibilityAttributedLabel.appendWithSeparator(mutableSpoilerText)
|
||||
} else if !contentTextView.isHidden {
|
||||
accessibilityAttributedLabel.append(mutableContent)
|
||||
}
|
||||
|
||||
for view in [attachmentsView, pollView, cardView] where !view.isHidden {
|
||||
|
|
Loading…
Reference in New Issue