Improve a11y labels on post editor menu

This commit is contained in:
Angelo Stavrow 2020-12-30 14:49:07 -05:00
parent 34c2cd181e
commit e68030ec71
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -80,6 +80,8 @@ struct PostEditorView: View {
}, label: {
Label("Publish…", systemImage: "paperplane")
})
.accessibilityHint(Text("Choose the blog you want to publish this post to"))
.disabled(post.body.count == 0)
} else {
Button(action: {
if model.account.isLoggedIn {
@ -97,6 +99,7 @@ struct PostEditorView: View {
}, label: {
Label("Share", systemImage: "square.and.arrow.up")
})
.accessibilityHint(Text("Open the system share sheet to share a link to this post"))
.disabled(post.postId == nil)
// Button(action: {
// print("Tapped 'Delete...' button")
@ -130,6 +133,7 @@ struct PostEditorView: View {
.onTapGesture {
hideKeyboard()
}
.disabled(post.body.count == 0)
}
}
}