keyboard navigation broken after use accessibilityRepresentation

Example code:

struct ContentView: View {

    @State var isSelected = false

    var body: some View {
        VStack {
            Button("Button1") {
            }

            Button(action: {
            }, label: {
                Image(systemName: "checkmark.square")
            })
            .accessibilityRepresentation {
                Toggle("", isOn: $isSelected)
            }

            Button("Button3") {
            }
        }
        .padding()
    }
}

There are three buttons in the view, the middle button I want to custom Toggle and using accessibilityRepresentation replace accessibility elements.

But using keyboard navigation (System settings -> Keyboard -> Keyboard navigation) VocieOver can't read the middle button. (VoiceOver key can read it)

If not use accessibilityRepresentation, the keyboard navigation works

How to make keyboard navigation read the accessibilityRepresentation elements?

Hello, thanks for taking the time to write about this! This sounds like a bug to me. Please take a few extra minutes and paste this issue into a bug report so we can confirm this is tracked in our internal system. You can file a report here: https://developer.apple.com/bug-reporting/

Once you do, feel free to reply with the Feedback ID number and I can make sure the right people are aware of this issue.

Curious whether it is recommended for VoiceOver users to mix VO navigation and keyboard navigation. Does Apple have any priciples here? Thanks!

keyboard navigation broken after use accessibilityRepresentation
 
 
Q