accessibilityActivationPoint Not Working When Set Directly on UITableViewCell

I’m trying to set the accessibilityActivationPoint directly on a UITableViewCell so that VoiceOver activate on a specific button inside the cell. However, this approach doesn’t seem to work.

Instead, when I override the accessibilityActivationPoint property inside the UITableViewCell subclass and return the desired point, it works as expected.

Why doesn’t setting accessibilityActivationPoint directly on the cell work, but overriding it inside the cell does? Is there a recommended approach for handling this scenario?

The following approach works,

override var accessibilityActivationPoint: CGPoint {
get {
return convert(toggleSwitch.center, to: nil)
}
set{
super.accessibilityActivationPoint = newValue
}
}

but setting accessibility point directly not works

private func configureAccessibility() {
isAccessibilityElement = true
accessibilityLabel = titleLabel.text
accessibilityTraits = .toggleButton
accessibilityActivationPoint = self.convert(toggleSwitch.center, to: self)
accessibilityValue = toggleSwitch.accessibilityValue
}

Hello, this seems like it could be a bug. Please take a few minutes and paste this issue into a report. Feel free to include the code samples you listed here or link to the forum post. Any additional information like screenshots of the UI demonstrating the difference in VoiceOver experience will help too.

You can file a report here: https://developer.apple.com/bug-reporting/

accessibilityActivationPoint Not Working When Set Directly on UITableViewCell
 
 
Q