Re: When is NSAccessibilityRTFForRangeParameterizedAttribute used?
Re: When is NSAccessibilityRTFForRangeParameterizedAttribute used?
- Subject: Re: When is NSAccessibilityRTFForRangeParameterizedAttribute used?
- From: Bill Cheeseman <email@hidden>
- Date: Fri, 9 Apr 2010 18:07:24 -0400
On Apr 9, 2010, at 5:33 PM, Scott Kovatch wrote:
> I'm working on responding to accessibility attribute requests for Eclipse's text editors, and I'm trying to figure out a few things. It
>
> In TextEdit, VoiceOver speaks the alignment and justification for text. We have the ability to set the alignment and justification, and so on, but I don't see any attributes that I could set. How is this information being picked up by VoiceOver?
>
> My hunch was that NSAccessibilityRTFForRangeParameterizedAttribute could do it, but when I implement that in my objects it never gets called. Under what conditions would this method be called?
You might find it helpful to use PreFab UI Browser in your testing. This and the other parameterized text attributes are handled. For this attribute, you can set the range parameter in UI Browser and get back the corresponding RTF from any RTF view.
For example, type some RTF text into a TextEdit window. Then, with UI Browser running, place the cursor over a line of text and hit the system-wide hot key (Control-Command-S). The text view will automatically be selected in UI Browser's main browser window. Then open UI Browser's Attributes drawer and select the RTF for Range attribute. Some UI elements will appear to the right in the drawer allowing you to set different input ranges and extract the associated text. To see the extracted text in all its RTF glory, click the View in Window button.
In UI Browser, you can't do anything more with the extracted RTF data than that, but this technique does allow you to verify that your own custom objects respond as you expect them to. This is the purpose of UI Browser -- it's an accessibility testing tool to help developers make sure their applications are properly accessible.
An assistive application can easily be written to use this parameterized attribute in the same way that UI Browser uses it, and to do more with the extracted RTF, such as speaking its rich text features. I have no idea whether VoiceOver uses this parameterized attribute.
Download the free 30-day trial version of UI Browser at <http://prefabsoftware.com/uibrowser>.
--
Bill Cheeseman
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