Re: generation of checked/unchecked and other words
Re: generation of checked/unchecked and other words
- Subject: Re: generation of checked/unchecked and other words
- From: Ricky Sharp <email@hidden>
- Date: Tue, 5 Sep 2006 13:32:23 -0500
On Sep 5, 2006, at 1:09 PM, Ricky Sharp wrote:
Where does VoiceOver obtain phrases such as "checked" and
"unchecked" for checkboxes?
For example, in the Sound prefs panel (Mac OS X 10.4.7), there's a
checkbox:
[ ] Mute
Acc Inspector shows (among other things), these attributes:
AXRole: "AXCheckbox"
AXRoleDescription: "check box"
AXValue: "0"
AXDescription: "output volume mute"
Anyhow, when VoiceOver speaks this checkbox, it produces:
"Mute<pause>unchecked check box" where <pause> is a longer break in
the speech (as compared to the normal pause/silence between words>.
It appears as if the word "unchecked" or "checked" do not come from
any attributes. My guess is that VoiceOver is modifying the role
description before speaking. Is that correct?
For my custom list object, I want to have items be spoken as either
"<title> list item" or "<title> selected list item". The only way
I've found to do this was to conditionally build up my role
description:
else if ([anAttribute
isEqualToString:NSAccessibilityRoleDescriptionAttribute])
{
if ([self state] == NSOnState)
theValue = @"selected list item";
else
theValue = @"list item";
}
I've looked at code examples, but I cannot find any that need to
provide state info into what is spoken by VoiceOver.
Note that if I just build up an AXDescription myself, I do not get
the longer <pause> at the right place. For example, I get this:
"<title> selected<pause>list item" or even this run-on sentence
"<title> selected list item"
Just to tie things a bit to a previous thread, another option I can
do for my list is to have the IIList (NSMatrix) use a role of
AXRadioGroup and have its cells use roles of AXRadioButton. Finally,
I can override the cell's role description to return "list item".
VoiceOver will then inject not only the word "selected", but will
suffix it will "n of m":
"Victoria<pause>selected list item 1 of 3"
I'm not too happy with this longer output, but I'm a bit nervous in
modifying my role description as in my first post above to use
"selected" in it. Seems bad to have Acc Inspector provide a role
description of either "list item" or "selected list item".
I just wish there was a method to instruct VoiceOver to build up a
custom string out of components you can easily supply. It seems
that's there a lot of coupling between Accessibility APIs and
VoiceOver that prevent custom solutions from being implemented.
Am I at the mercy of having to use built-in roles to get the behavior
I need? I fear I'm ending up in a catch-22 for some of my controls;
using built-in roles often do not quite fit and using custom roles do
not often provide me the desired VoiceOver output.
___________________________________________________________
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