Currently in webkitAccessibleGetRole() we have: g_return_val_if_fail(WEBKIT_IS_ACCESSIBLE(object), ATK_ROLE_UNKNOWN); returnValIfWebKitAccessibleIsInvalid(WEBKIT_ACCESSIBLE(object), ATK_ROLE_UNKNOWN); and: if (!coreObject) return ATK_ROLE_UNKNOWN; ATK_ROLE_UNKNOWN suggests that there is a valid accessible object but the platform role mapping for that object is unknown. It is an indication of a WebKit bug (there should be a valid mapping). But it is also an indication to assistive technologies that there might be some obtainable useful information associated with this mystery object. As such assitive technologies might choose to poke at the object further. In contrast, if the object is null or otherwise invalid, there is arguably no obtainable useful information and thus ATs should not bother trying. We can distinguish these two conditions by exposing the latter as ATK_ROLE_INVALID.
Created attachment 240090 [details] Patch
(In reply to comment #1) > Created attachment 240090 [details] > Patch This is a WIP (hence not asking for review yet). Fixing the bug is simple enough; coming up with a test case is harder because we shouldn't be exposing accessible objects that have ROLE_UNKNOWN or ROLE_INVALID to assistive technologies in the first place. But I haven't given up quite yet. :)
<rdar://problem/18782947>
Created attachment 241496 [details] Patch
Mario or Chris: The patch is trivial. And there is a test now. (I had forgotten about detached objects as a valid and easy means to test this.) So if either of you has time for a quick review, that would be awesome. Thanks!
Comment on attachment 241496 [details] Patch Thanks Chris!
Comment on attachment 241496 [details] Patch Clearing flags on attachment: 241496 Committed r176091: <http://trac.webkit.org/changeset/176091>
All reviewed patches have been landed. Closing bug.