Floaty
Floaty copied to clipboard
Floaty items aren't clickable when I turn voiceover on
I tried to add accessibility features to my app but when I turn on VoiceOver, floaty items are not clickable. I manually added these lines below but they are still not clickable. I also tried #183. When I open VoiceOver from settings, can't click floaty items. iPhone 7 iOS 15.3 Swift 5 Xcode 13.4
@discardableResult
@objc open func addItem(_ title: String, icon: UIImage?, handler: @escaping ((FloatyItem) -> Void)) -> FloatyItem {
let item = FloatyItem()
// ---------
item.isAccessibilityElement = true
item.accessibilityLabel = title
item.accessibilityHint = "hint hint"
item.accessibilityTraits.insert(.button)
// ---------
itemDefaultSet(item)
item.title = title
item.icon = icon
item.handler = handler
addItem(item: item)
return item
}
}