This seems like something NSString could do. Feel free to file a bug on AppKit.
I will
I've always found the notifications to be tricky. You might need to post the notifications from AppKit objects (e.g. NSApplication) rather than the custom objects. We're investigating this.
To be precise, this method alone does work unless you want to modify hierarchy. That is, assume the following hierarchy:
AXGroup (AppKit object) AXButton (custom object) -- focused AXTextField (custom object)
If you change state of the control, so that AXGroup's -[NSAccessibility accessibilityFocusedUIElement] will return AXTextField and then post notification for AXGroup: NSAccessibilityPostNotification(AXGroup, NSAccessibilityFocusedUIElementChangedNotification) It will work.
However, if you want to "transform" hierarchy from:
AXGroup (AppKit object) AXButton (custom object) -- focused
to:
AXGroup (AppKit object) AXTextField (custom object) -- focused
by doing the following:
- Modify control's state to return AXTextField as its only child rather than AXButton - Post notifications in that order: NSAccessibilityPostNotification(AXTextField, NSAccessibilityCreatedNotification) NSAccessibilityPostNotification(AXGroup, NSAccessibilityFocusedUIElementChangedNotification) NSAccessibilityPostNotification(AXButton, NSAccessibilityUIElementDestroyedNotification)
Strange things will happen: VO will not completely update its knowledge about the object, it will reuse values for some old attributes, but updates values for new attributes (like NSAccessibilityValueAttribute).
On 21.12.2012, at 11:43, Josh Scotland < email@hidden> wrote: Likely. But the problem is that they are too general and sometimes you need to override them.
I agree with you Ilya. It'd be nice if VO knew to speak semicolons, especially in apps like Xcode and BBEdit.
Yes, that's obvious work around which is similar to what I have with modifier flags. The problem is there is no standard method to convert symbol to its localized readable equivalent.
This seems like something NSString could do. Feel free to file a bug on AppKit.
I've found a bunch of resources online that provide the mapping. Here's one:
NSAccessibilityPostNotification(newElement, NSAccessibilityFocusedUIElementChangedNotification)
I've always found the notifications to be tricky. You might need to post the notifications from AppKit objects (e.g. NSApplication) rather than the custom objects. We're investigating this. On Dec 20, 2012, at 2:55 PM, Илья Кулаков < email@hidden> wrote: Check out VoiceOver Utility -> Verbosity settings. It might be that VO is choosing to ignore certain characters based on user preferences.
Likely. But the problem is that they are too general and sometimes you need to override them.
I like the idea of a tagging system. What if you created the tagging system in the app? You could map certain characters like ';' to 'semicolon' before setting the button title.
Yes, that's obvious work around which is similar to what I have with modifier flags. The problem is there is no standard method to convert symbol to its localized readable equivalent.
Which NSAccessibilityNotification are you posting and on what object? The lack of notification announcement might be due to a Verbosity setting under Announcements.
I've tried: NSAccessibilityPostNotification(newElement, NSAccessibilityCreatedNotification) NSAccessibilityPostNotification(newElement, NSAccessibilityFocusedUIElementChangedNotification) NSAccessibilityPostNotification(oldElement, NSAccessibilityUIElementDestroyedNotification)
where newElement - element with TextField role and oldElement - element with Button role. There was an interesting bug - if you change cursor manually (by using VO keys) and then move it back, it will use Value of the new TextField element, but role description of Button. If key is ';' or ',' VO most of the time does not pronounce them.
Check out VoiceOver Utility -> Verbosity settings. It might be that VO is choosing to ignore certain characters based on user preferences. I wish there would some tagging system, so I could pass "Command-Control-Option-<word>;</word>".
I like the idea of a tagging system. What if you created the tagging system in the app? You could map certain characters like ';' to 'semicolon' before setting the button title.
I also found that VO ignores notifications regarding changing hierarchy. That is, it's impossible to programmatically destroy currently selected UI Element, create new one and let VO to know of these changes.
Which NSAccessibilityNotification are you posting and on what object? The lack of notification announcement might be due to a Verbosity setting under Announcements. On Dec 20, 2012, at 5:40 AM, Ilya Kulakov < email@hidden> wrote: Hi Josh,
Looks like I've found a solution for every problem I mention. It seems to work on ML. Didn't have a chance to test it on other systems.
One thing which is unclear to me is that every time modifier flags are changed, VO asks for NSAccessibilityTitleAttribute and pronounce it without Role Description. It's okay for my specific case, but I wonder whether it will work on previous (and even future) versions of OSX and whether it'll work with other assistive devices.
Another problem is that I don't know how to suggest an assistive device how to interpret shortcut correctly. If modifier flags are represented as unicode characters, VO sometimes does not pronounce them. I've worked it around by passing "readable" equivalents (e.g. Command, Control, Option). However, I don't know what to do with "key code" part of shortcut. If key is ';' or ',' VO most of the time does not pronounce them. I wish there would some tagging system, so I could pass "Command-Control-Option-<word>;</word>".
I also found that VO ignores notifications regarding changing hierarchy. That is, it's impossible to programmatically destroy currently selected UI Element, create new one and let VO to know of these changes. Seems like VO cannot correctly handle situation when selected object is removed from the hierarchy (it's either not listed as child on the parent or it's accessibilityIsIgnored returns YES).
On 20.12.2012, at 11:42, Josh Scotland < email@hidden> wrote: Hi Ilya,
Thanks for providing pictures of the button(s) in question.
- Either pronounce both Description and Value (current shortcut) or pronounce only Description and make Value somehow accessible (e.g. by special VO shortcut)
Are you running into an issue of VO not pronouncing the description and value in the inactive mode or in the active mode where a user is putting in their shortcut keys. - Make it pronounce Value after shortcut was typed
Same question -- after the shortcut is typed, does the button go to the inactive mode and VO isn't pronouncing the value when it is the title of the button? On Dec 18, 2012, at 9:43 AM, Илья Кулаков < email@hidden> wrote: Hi everyone.
I'm developing custom control, new incarnation of well-known ShortcutRecorder. New implementation has the following design:
In inactive mode, control appears like a usual button: <Screen Shot 2012-12-19 at 0.19.15.png>
Once clicked, it becomes active: <Screen Shot 2012-12-19 at 0.20.37.png> The snap back button cancels editing and the clear button removes current shortcut.
I was inspired by WWDC videos from 2010 and 2012 to bring Accessibility support to this control. Here is my vision of how should it work: Once a user moves VoiceOver cursor to the control, I want it to pronounce View's Description (e.g. assigned in IB) and current shortcut. Once a user starts editing, he should be able to start interacting with control (move inside the control) and navigate to the snapback and clear buttons.
I decided that the best role for the control would be Button. Unfortunately I have no idea ho solve the following issue: - Either pronounce both Description and Value (current shortcut) or pronounce only Description and make Value somehow accessible (e.g. by special VO shortcut)
- Make it pronounce Value after shortcut was typed
I would very appreciate any help regarding my Accessibility design and problems.
Best regards, Ilya Kulakov
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
|