Re: Using title UI element in custom descriptions
Re: Using title UI element in custom descriptions
- Subject: Re: Using title UI element in custom descriptions
- From: Ricky Sharp <email@hidden>
- Date: Wed, 19 Jul 2006 16:16:33 -0500
On Jul 19, 2006, at 2:57 PM, Mike Engber wrote:
For a particular set of math problems, this shows the number of
problems answered correctly. I want the custom description to be:
5 of 10 problems correct progress bar
The description should be just "problems correct" The fact that
it's a progress bar should come from its role. The 5 of 10 should
come from its value and maxValue attributes.
If you don't do it this way, when VoiceOver composes the string it
speaks it will produce something incorrect.
Actually, I wasn't happy with how VoiceOver was piecing things
together and so began looking at providing a completely custom
description. I'm still going through an experimentation phase though
and it could be the case where I revert back to doing exactly what
you describe above.
Currently, my custom UI breaks down into two camps:
(1) Replacements for Apple standard controls (e.g. push buttons,
checkboxes). I've got these fully accessible and they use the
standard roles, descriptions etc. e.g. on checkboxes, VoiceOver will
speak things like "Use Smart Drills unchecked checkbox" which is the
exact same behavior as if I used a standard Aqua checkbox.
(2) non-standard controls or views (e.g. animated number line view).
Some are informational only and others allow user interaction. Where
possible, I've tried to use standard roles. But the description
wasn't always using attributes that I wanted and thus I started to
deviate in providing custom description attributes.
id theTitleUIElement = [super
accessibilityAttributeValue:NSAccessibilityTitleUIElementAttribute]
;
Now, as to why your always getting nil. James was correct in
pointing out that if the attribute's value is overridden (in IB or
in code) we don't provide a way to get the value.
You could file a bug requesting a new API. But, it's not something
that's normally need - your example doesn't warrant it.
Agreed. As I have IB palettes for all my custom items, it's trivial
to set the title attribute and thus not have to deal with linked
title UI elements.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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