Xcode v9.0 beta 2: Creating IBOutlets and IBActions no longer works reliably when using VoiceOver

Originator:robin
Number:rdar://33198923 Date Originated:Jul 18, 2017
Status:Open Resolved:No
Product:Xcode Product Version:v9.0 beta 2 (9M137d)
Classification:Serious Bug Reproducible:Always
 
Summary:
In the latest beta release of Xcode 9, Xcode 9.0 beta 2 (9M137d), it is no longer possible to reliably create Interface Builder outlets and actions when using VoiceOver.
Using VoiceOver keyboard commands to drag outlets or actions from the Connections Inspector into the Assistant Editor will lead to erratic VoiceOver behavior, making it nearly impossible for developers relying on VoiceOver to connect user interface elements to code.

This issue is new in Xcode 9 beta, the current release version of Xcode (v8.3.3) is not affected by this bug.

Steps to Reproduce:
1. On a Mac running Xcode 9 beta 2, launch VoiceOver by pressing CMD+F5 or from within accessibility system preferences.
2. Launch Xcode 9 beta 2.
3. Create a new Xcode project with the following settings:
Platform: iOS
Template: Single View App
Name: VoiceOver-IBOutlet
Team: [Select your team]
Organization Name: [Your organization name]
Organization Identifier: [Your organization identifier]
Language: Swift
Use Core Data, Include UI Tests, Include Unit Tests: all unchecked
4. Click next and choose the desired location for the newly created project.
5. Once the new project is open in Xcode, choose Main.storyboard in the Project Navigator.
6. From the Object Library, drag a label onto the canvas.
7. Press Option+Command+Return to open ViewController.swift in the Assistant Editor.
8. The objective now is to create an outlet for the new label, the @IBOutlet declaration should be right below this line:

class ViewController: UIViewController {

In order to add the new outlet, use VoiceOver keyboard commands to interact with the file Main.storyboard which is open in the Assistant Editor.
9. Using VoiceOver keyboard commands, interact with the Document Outline table, moving the VoiceOver cursor to the previously added label.
10. Press Control+Command+Shift+up arrow 3 times to stop interacting with the Document Outline Table, the Main.storyboard file as well as the editor area.
11. Using VoiceOver keyboard commands, navigate to and interact with the Inspector group. Select the "Connections Inspector" radio button, then navigate to and interact with the scroll area that contains the various outlet and action connections.
12. Using VoiceOver keyboard commands, navigate to and interact with the "Referencing Outlets" disclosure group. Move the VoiceOver focus to the "Connect new referencing outlet" button.
13. Press Control+Option+Command+F5 to route the mouse to the VoiceOver cursor.
14. Press Control+Option+Command+Shift+Spacebar to begin dragging the new outlet.
15. Using VoiceOver keyboard commands,, stop interacting with the disclosure group, the scroll area and the Inspector group.
Navigate back to and interact with the editor area, then interact with the ViewController.swift group and the Source Editor text field.
16. Use Control+Option+arrow keys in an attempt to move the VoiceOver cursor to the location where the new outlet should be created in code, which is the blank line below the class definition line.
VoiceOver will display erratic and unpredictable behavior here, skipping around the source code. Sometimes, VoiceOver will jump from the top of the document directly to the bottom, essentially making it impossible to navigate within the document in this way.
17. Press Control+Option+Command+Spacebar to release the left mouse button and finish dragging the new outlet.

Expected Results:
Following the steps outlined above, a developer using VoiceOver should easily be able to create new outlet definitions. This works very well in the current release version of Xcode.

Observed Results:
In Xcode 9 beta 2, it is no longer possible to use VoiceOver keyboard commands in order to drag a new outlet or IBAction into the source code, as navigating the source code file using the VoiceOver cursor is no longer possible.
When doing so, VoiceOver will behave in an unexpected manner, moving the cursor to seemingly random positions within the source code file.
In most cases, this means it is essentially impossible to create new outlets or actions using VoiceOver.

In some rare instances, Xcode will create a new outlet, but the declaration for the new outlet will often be created in an inappropriate location, e.g. within a function's body.

Ultimately, this makes outlet creation very unintuitive and cumbersome for blind developers relying on VoiceOver.

Comments

This issue still exists in the latest beta release of Xcode 9, Xcode 9.0 beta 5 (9M202q

I originally filed this bug against Xcode 9 beta 2, but it is still present in beta 4.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!