Apple Watch v1.01 Voice Over Accessibility of WKInterfaceTable rows doesn't work

82 views Asked by At

I'm trying to get some simple Voice Over setup working on my Watch app. I use a WKInterfaceTable who's rows have multiple elements within them. At the moment voice over just goes over each individual element reading them out.

I want to set that each of my rows

isAccessibilityElement

to YES so that it will itself become voice over selectable and will hide its children elements.

Unfortunately this just doesn't seem to work. The rowcontroller's have to inherit off of NSObject, not WKInterfaceObject and it just seems to not be respecting the isAccessibilityElement property. I set it, and the label for each rowController but voice over continues to just select the children of the row, and ignore any of the accessibility setup I've got on the rowController itself.

I've seen a WWDC video this year talking about this stuff, I'm presuming this is an WatchKit 2.0 feature that this stuff all works, or has anyone had any success getting their Watchkit 1.0 apps to have anything other than the most simple built in voice over accessibility?

Thanks for your time

1

There are 1 answers

0
DeveloBär On

Instead of setting the accessibilityHint and accessibilityLabel on the row itself, connect the main Group to your Cell NSObject class as well and set the accessibility properties on this group:

@IBOutlet var mainGroup: WKInterfaceGroup!

and

let row = workoutTypeSelectionTable.rowController(at: index) as! WorkoutSelectionCell
row.mainGroup.setAccessibilityHint("Double tap to start.")
row.mainGroup.setAccessibilityLabel("Start a new \(disciplineTitle) session.")