VoiceOver reading results of Swift Playground print statements in Xcode
(By way of background I have been helping a local blind child learn coding. He's switching schools from a Windows based school to a Mac based school so I am trying to familiarise myself with VoiceOver on the Mac.)
I have a very simple Swift Playground in Xcode which I am trying to build and run using VoiceOver.
var rate = 26
var hours = 12.5
var cost = Double(rate) * hours
print(cost)
As I type that last line VoiceOver reads what I am typing. I then use the keyboard shortcut Shift Command Enter (⇧⌘↵) to run the playground. VoiceOver announces "Run Playground" but does not read the resulting output. I cannot work out how to get it to read the result nor how to navigate to that bottom pane where it might read "325". How would I do either of those things?
It's really cool that you're helping a blind person learn how to code! There must be some approach to gather the output in the Xcode console, but it is certainly possible that XCode may lack VoiceOver support for it.
Nevertheless, I'm wondering if you can't take advantage of the built-in VoiceOver functions in a clever way.
Something like:
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, cost);
Essentially, just replacing print
with a manual UIAccessibilityPostNotification
.