Bug 137867

Summary: AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible objects
Product: WebKit Reporter: Joanmarie Diggs <jdiggs>
Component: AccessibilityAssignee: Joanmarie Diggs <jdiggs>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, cgarcia, commit-queue, dmazzoni, jcraig, mario, samuel_white
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: Linux   
Attachments:
Description Flags
Patch
none
Patch none

Joanmarie Diggs
Reported 2014-10-19 15:11:18 PDT
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.
Attachments
Patch (2.11 KB, patch)
2014-10-19 15:15 PDT, Joanmarie Diggs
no flags
Patch (6.85 KB, patch)
2014-11-13 12:41 PST, Joanmarie Diggs
no flags
Joanmarie Diggs
Comment 1 2014-10-19 15:15:33 PDT
Joanmarie Diggs
Comment 2 2014-10-19 15:17:55 PDT
(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. :)
Radar WebKit Bug Importer
Comment 3 2014-10-27 11:03:21 PDT
Joanmarie Diggs
Comment 4 2014-11-13 12:41:51 PST
Joanmarie Diggs
Comment 5 2014-11-13 13:14:25 PST
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!
Joanmarie Diggs
Comment 6 2014-11-13 13:30:21 PST
Comment on attachment 241496 [details] Patch Thanks Chris!
WebKit Commit Bot
Comment 7 2014-11-13 14:11:40 PST
Comment on attachment 241496 [details] Patch Clearing flags on attachment: 241496 Committed r176091: <http://trac.webkit.org/changeset/176091>
WebKit Commit Bot
Comment 8 2014-11-13 14:11:48 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.