SwiftUI .toolbar(placement: .keyboard) item not exposed to accessibility on iOS 26.1 (affects VoiceOver + XCUITest)

Description

On iOS 26.1, a ToolbarItem placed in .keyboard is no longer exposed to the accessibility hierarchy. As a result:

  • VoiceOver cannot focus or activate the toolbar button
  • XCUITest cannot discover the element, making the UI impossible to test
TextEditor()
    .toolbar {
        ToolbarItem(placement: .keyboard) {
            Button("Done") { /* action */ }
        }
    }

This worked correctly on previous iOS versions.

The button appears visually but is missing from both VoiceOver navigation and XCUI accessibility queries.

Steps to Reproduce

  1. Create a new SwiftUI project.
  2. Use a simple text field with a keyboard toolbar button.
  3. Run on an iOS 26.1 device or simulator.
  4. Focus the text field to show the keyboard.
  5. Turn on VoiceOver and attempt to navigate to the toolbar button.
  6. Run an XCUITest attempting to locate the button

That's an odd behavior, I'd appreciate it if you could open a bug report, include the sample code and post the FB number here once you do. Bug Reporting: How and Why? has tips on creating your bug report.

SwiftUI .toolbar(placement: .keyboard) item not exposed to accessibility on iOS 26.1 (affects VoiceOver + XCUITest)
 
 
Q