Re: AXValue and NSView
Re: AXValue and NSView
- Subject: Re: AXValue and NSView
- From: Patti Hoa <email@hidden>
- Date: Mon, 9 Nov 2009 12:11:51 -0800
"custom role"... that's the hint right there. VoiceOver only recognizes standard defined roles. Else there's no way that VoiceOver would know which attributes to look out for and how to behave on that UI.
There is the AXTimeField with AXTextField children implementation. Take a look at the Carbon AppearanceSample example found in the Developer package) There's a date field in the text tab of the window. You can do something similar but use the AXTimeField instead.
HOWEVER, currently VoiceOver does not support AXTimeField role yet. So if you want your UI to work with existing VoiceOver, I would recommend that you simply accessorize this timer as an AXStaticText. Fire off AXValueChangedNotification as the AXValue changes.
Patti
VoiceOver Engineer
On Nov 9, 2009, at 9:18 AM, Martin Pilkington wrote:
> Hey,
>
> I've got an NSView subclass that represents a digital clock. I've set several accessibility attributes on it: a custom role & role description ("timer"), a description ("recording") and a value (the current time in the format "x hours, y minutes, z seconds" with irrelevant units taken out eg if only 50 seconds have passed it will just say "50 seconds"). Accessibility Inspector is showing that these are all set fine on the view, but when I try VoiceOver, the value isn't read. I've implemented -accessibilityAttributeNames, -accessibilityAttributeValue: and -accessibilityIsAttributeSettable: and they all seem to work, but I can't seem to get the value read. I really don't want to have to resort to putting the value into the description as it doesn't really feel right being there, but I can't seem to find why VoiceOver won't read it.
>
> Thanks
>
> Martin
> _______________________________________________
> 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