Re: VO doesn't speak selection changes in a popup list
Re: VO doesn't speak selection changes in a popup list
- Subject: Re: VO doesn't speak selection changes in a popup list
- From: Pete Brunet <email@hidden>
- Date: Tue, 09 Aug 2016 16:31:12 -0500
Hi Patti,
It turns out my post had a typo. That was a AXPopupButton, not a
AXPopupMenu.
Output of Accessibility Inspector
A native popupmenu
AXApp
AXWindow
AXPopupButton
AXMenu
AXMenuItem
Popup generated by Java runtime
AXApp
AXWindow:AXSystemDialog [1]
AXPopupButton
AXList
AXStaticText
[1] This is AXStandardWindow when VO is not running
A week or so ago I tried changing the mapping of Java roles, i.e. AXList
to AXMenu and AXStaticText to AXMenuItem, but that did not help.
However I did not try firing the three notifications you mentioned.
I would have tried them had I seen them listed here:
https://developer.apple.com/library/mac/documentation/AppKit/Reference/NSAccessibility_Protocol_Reference/index.html#//apple_ref/c/data/NSAccessibilityAnnouncementRequestedNotification
Are they undocumented or am I using the wrong documentation?
Here is how selected child changes are posted
NSAccessibilityPostNotification(self,
NSAccessibilitySelectedChildrenChangedNotification);
Would the posting for menu open be
NSAccessibilityPostNotification(self, kAXMenuOpenedNotification);
Pete
On 8/8/16 1:31 PM, Patti Hoa wrote:
> Hi Peter,
> The first obvious problem is that “AXPopupMenu” is not one of the accepted AXRole in macOS. So VoiceOver will not be able to see/understand this element.
>
> If you look at a generic NSPopupButton menu accessibility hierarchy, it is more like this:
> AXWindow
> AXPopupButton
> AXMenu
> AXMenuItem (one)
> AXMenuItem (two)
>
>
> And of course you need to send off menu notifications when appropriate: kAXMenuOpenedNotification, kAXMenuClosedNotification, kAXMenuItemSelectedNotification
>
>> On Aug 3, 2016, at 9:23 PM, Pete Brunet <email@hidden> wrote:
>>
>> I'm trying to get VO to speak selection changes in a popup list and am
>> not having any luck so am looking for some ideas.
>>
>> According to Accessibility Inspector the tree looks like this:
>> AXApplication
>> AXWindow:AXSystemDialog
>> AXPopupMenu
>> AXList
>> AXStaticTest
>>
>> This is generated from a Java JList attached to a JPopupMenu which is
>> shown when a JButton is activated. The list has 5 items, "one" ... "five".
>>
>> When the list appears VO does announce it: "system dialog, interact with
>> popup button, 5 items, one". But when pressing up/down arrow VO doesn't
>> announce the selection changes.
>>
>> Looking at the VO calls that come back in after a posting a
>> NSAccessibilitySelectedChildrenChangedNotification for the list I only see
>> - role called once on list, returns list
>> - enabled called on label, only when moving from one to two, returns true
>> - isIgnored called once on list, returns 0
>>
>> accessibilityAttributeNames for the list are:
>> AXParent,
>> AXRole,
>> AXRoleDescription,
>> AXHelp,
>> AXWindow,
>> AXTopLevelUIElement,
>> AXEnabled,
>> AXSize,
>> AXPosition,
>> AXFocused,
>> AXChildren,
>> AXSelectedChildren,
>> AXVisibleChildren
>>
>> accessibilityAttributeNames for the labels are:
>> AXParent,
>> AXRole,
>> AXRoleDescription,
>> AXHelp,
>> AXWindow,
>> AXTopLevelUIElement,
>> AXEnabled,
>> AXSize,
>> AXPosition,
>> AXFocused,
>> AXTitle,
>> AXValue,
>> AXSelectedText,
>> AXSelectedTextRange,
>> AXNumberOfCharacters,
>> AXVisibleCharacterRange,
>> AXInsertionPointLineNumber,
>> AXSelected,
>> AXIndex
>>
>> I tried posting a NSAccessibilityLayoutChangedNotification on the list
>> (with list in the userInfo dictionary) after the list became visible
>> with no luck.
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Accessibility-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden