diff --git a/Tusker/Screens/Compose/ComposeCurrentAccount.swift b/Tusker/Screens/Compose/ComposeCurrentAccount.swift index 6bb471ff..878c6139 100644 --- a/Tusker/Screens/Compose/ComposeCurrentAccount.swift +++ b/Tusker/Screens/Compose/ComposeCurrentAccount.swift @@ -22,7 +22,7 @@ struct ComposeCurrentAccount: View { ComposeAvatarImageView(url: account?.avatar) .frame(width: 50, height: 50) .cornerRadius(preferences.avatarStyle.cornerRadiusFraction * 50) - .accessibility(label: Text(account != nil ? "\(account!.displayName) avatar" : "Avatar")) + .accessibilityHidden(true) if let id = account?.id, let account = mastodonController.persistentContainer.account(for: id) { diff --git a/Tusker/Screens/Compose/ComposeHostingController.swift b/Tusker/Screens/Compose/ComposeHostingController.swift index d2dd2509..d346604d 100644 --- a/Tusker/Screens/Compose/ComposeHostingController.swift +++ b/Tusker/Screens/Compose/ComposeHostingController.swift @@ -107,6 +107,11 @@ class ComposeHostingController: UIHostingController Bool { + dismissCompose(mode: .cancel) + return true + } + // MARK: Duckable func duckableViewControllerWillAnimateDuck(withDuration duration: CGFloat, afterDelay delay: CGFloat) { diff --git a/Tusker/Screens/Compose/ComposeReplyView.swift b/Tusker/Screens/Compose/ComposeReplyView.swift index 8f380359..0ada5abe 100644 --- a/Tusker/Screens/Compose/ComposeReplyView.swift +++ b/Tusker/Screens/Compose/ComposeReplyView.swift @@ -80,6 +80,7 @@ struct ComposeReplyView: View { .frame(width: 50, height: 50) .cornerRadius(preferences.avatarStyle.cornerRadiusFraction * 50) .offset(x: 0, y: offset) + .accessibilityHidden(true) } } diff --git a/Tusker/Screens/Compose/ComposeView.swift b/Tusker/Screens/Compose/ComposeView.swift index 32f6a3ba..c9eaaedd 100644 --- a/Tusker/Screens/Compose/ComposeView.swift +++ b/Tusker/Screens/Compose/ComposeView.swift @@ -202,11 +202,16 @@ struct ComposeView: View { private var header: some View { HStack(alignment: .top) { ComposeCurrentAccount() + .accessibilitySortPriority(1) + Spacer() + Text(verbatim: charactersRemaining.description) .foregroundColor(charactersRemaining < 0 ? .red : .secondary) .font(Font.body.monospacedDigit()) .accessibility(label: Text(charactersRemaining < 0 ? "\(-charactersRemaining) characters too many" : "\(charactersRemaining) characters remaining")) + // this should come first, so VO users can back to it from the main compose text view + .accessibilitySortPriority(0) }.frame(height: 50) }