mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Add a11y features to post editor context menu
Adding an .onTapGesture modifier here to dismiss the keyboard removes focus from whatever textview is active in the post editor, which prevents VoiceOver from getting confused about which accessibility frame should be read.
This commit is contained in:
parent
69cd86c1da
commit
34c2cd181e
@ -117,8 +117,19 @@ struct PostEditorView: View {
|
||||
}
|
||||
}
|
||||
}, label: {
|
||||
Image(systemName: "ellipsis.circle")
|
||||
ZStack {
|
||||
Image("does.not.exist")
|
||||
.accessibilityHidden(true)
|
||||
Image(systemName: "ellipsis.circle")
|
||||
.imageScale(.large)
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
})
|
||||
.accessibilityLabel(Text("Menu"))
|
||||
.accessibilityHint(Text("Opens a context menu to publish, share, or move the post"))
|
||||
.onTapGesture {
|
||||
hideKeyboard()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user