Skip to content

Floaty items aren't clickable when I turn voiceover on #317

@EmirhanKarahan

Description

@EmirhanKarahan

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
  }

  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions