What is the AXReplaceRangeWithText attribute?
What is the AXReplaceRangeWithText attribute?
- Subject: What is the AXReplaceRangeWithText attribute?
- From: Bill Cheeseman <email@hidden>
- Date: Fri, 28 Sep 2018 04:03:49 -0400
My UI Browser app includes a screen reader that works a lot like Apple's
Accessibility Inspector.
In macOS Mojave 10.14, when my screen reader calls
AXUIElementCopyAttributeNames(), it discovers that many applications have a new
attribute, AXReplaceRangeWithText. This attribute is documented nowhere that I
can find. Can somebody tell me what it does, including what kinds of UI
elements have it and what values it returns? Is it a parameterized attribute?
Does it perform some action on the target application?
Calling AXUIElementCopyAttributeValue() for this attribute almost always
crashes the target application. For example, it reliably crashes Xcode, Console
and Accessibility Inspector when I mouse over windows belonging to those target
applications. Their crash logs always include these steps:
5 com.apple.AppKit 0x00007fff45a31b36
CopyAppKitUIElementAttributeValueNoCatch + 98
6 com.apple.AppKit 0x00007fff45a2ee61 CopyAttributeValue +
170
7 com.apple.HIServices 0x00007fff4680d2e6
_AXXMIGCopyAttributeValue + 272
8 com.apple.HIServices 0x00007fff4681676e _XCopyAttributeValue
+ 433
9 com.apple.HIServices 0x00007fff467edabe mshMIGPerform + 212
10 com.apple.CoreFoundation 0x00007fff48054a2f
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
If it doesn't crash the target application, it inserts text into a text area
when I mouse over it. For example, in Xcode it inserts a character or a few
characters at the insertion point -- always the same characters on multiple
runs, but a different set of characters if I rebuild UI Browser.
If I exclude AXReplaceRangeWithText when calling
AXUIElementCopyAttributeValue(), the target applications stop crashing. I
notice that Apple's Accessibility Inspector always excludes
AXReplaceRangeWithText from its list of target attributes. Is this why?
Bill Cheeseman
_______________________________________________
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