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