Did somebody happen to find a solution to this? I have an app with an embedded video player, and want the VoiceOver focus to start on the video player's play/pause button when navigating to a video page.
However UIAccessibility.post(notification: .layoutChanged, argument: videoPlayer.playPauseButton) does not reliably change the first focus after navigating to the video page. Sometimes the navigation bar's back button is focused first, sometimes the video description under the video is focused first, sometimes an element of the video player is focused first, but it's only ever its top left element (in my case, the full screen button), never the playPauseButton.
I can't quite understand by which logic the VoiceOver focus is set as it seems to behave semi-randomly here.
Post
Replies
Boosts
Views
Activity
Has anybody found an answer to this? Three years later I'm faced with the same question: It seems that only TVPosterView makes use of the Focus Style: High Contrast accessibility setting (showing a white frame around the view when focused). I'd like to be able to show such a frame on my custom views if this setting is enabled but I cannot find how to check if it's enabled.
Has anyone found a solution to this? CardButtonStyle applies the well-known "parallax effect" (its documentation refers to it as a motion effect) that wiggles the focused element when moving the finger on the Apple TV Remote touch area but I haven't found out how to replicate that effect without the styling that comes with CardButtonStyle.
The WWDC session Build SwiftUI apps for tvOS is a little odd in that at 1:42 it shows .buttonStyle(CardButtonStyle()) as the solution for when you'd want that that motion effect, and goes on to say that if you're looking for different styling than the one CardButtonStyle gives you, you can just create your own custom button style... without explaining how you can then get back the motion effect.
Looking at the Gestures, it seems that neither DragGesture nor anything else that might be used to implement this effect yourself is available on tvOS. 🤔
If anybody has an idea I'd greatly appreciate your advice.