Greetings,
Is there anything we can monitor or query via the accessibility API to have a narrower focus within the Numbers application? i.e.: know the coordinate on screen of the cell where the user is currently typing?
Context: We implemented a rather cool magnifier (ZoomText for Mac) which allows the user to run fullscreen magnification; the magnifier is able to track user focus and move to the area where the user is interacting with the application.
Challenge: In most applications (Mail, Safari, etc) when the user focus changes from one area to another, the area in question sends an accessibility notification for the AXElement and we move the focus to there but in the case of Numbers it seems the AXElements are rather… large.
When you first open a document 2013-03-27 12:19:42.271 ZoomText[4968:303] CHANGE-B setFocusedElement:onApp: value=com.apple.iWork.Numbers:AXApplication (Numbers)\AXWindow (Untitled)\AXSplitGroup\AXSplitGroup\AXSplitGroup\AXScrollArea\AXLayoutArea app=com.apple.iWork.Numbers tracker=<AI2UIElementTracker: 0x10025e380>
The AXLayoutArea is the area that contains all the cells, as such, it does not provide us with any specific on screen coordinates of which cell is selected. For example, when the user uses the arrow keys to change cells, we receive no AXElement changed notification. Then when the user starts typing.. we receive this AXElement with focus:
2013-03-27 12:19:44.830 ZoomText[4968:303] CHANGE-B setFocusedElement:onApp: value=com.apple.iWork.Numbers:AXApplication (Numbers)\AXWindow (Untitled) app=com.apple.iWork.Numbers tracker=<AI2WindowTracker: 0x102897a60>
Which is even worse, now the entire window is selected while the user types, the user press "Enter" at the end of entering data, now the focus moves back to the AXLayoutArea:
2013-03-27 12:19:48.063 ZoomText[4968:303] CHANGE-B setFocusedElement:onApp: value=com.apple.iWork.Numbers:AXApplication (Numbers)\AXWindow (Untitled)\AXSplitGroup\AXSplitGroup\AXSplitGroup\AXScrollArea\AXLayoutArea app=com.apple.iWork.Numbers tracker=<AI2UIElementTracker: 0x1021939e0>
Are there any properties or events we seem to be missing in order to properly track user focus in Numbers or is it just that application that is poorly designed for accessibility?
Dave Poirier Senior Software Developer cell: 18192097798 skype: ekscrypto
All I need is a towel, everything else can be answered by 42.
|