ui

module pkg::alloy::window::nsaccessibilitysource

VoiceOver for the macOS window (PLAN.md, F7c), through NSAccessibility: the view stands for the tree's root and every other node gets an element, an AlloyAccessibilityElement (a subclass of NSAccessibilityElement made here) holding the node's id, made as VoiceOver reaches it and released once the node is gone. The view's and the elements' methods answer from the tree the program sent; a node of no role is left out, its children standing in for it. The first question about the view asks the program for its tree, and what VoiceOver asks of a node is queued for the window to give the program once the call returns, as on Windows; changes to the tree post NSAccessibility's notifications. A grid's cells go into rows made from their own, elements standing for no node. A node sent with a map of its text answers lines, ranges, their frames and attributed strings from it (text_ranges.alloy), in UTF-16 units.