Bug 139071

Summary: AX: [ATK] Inline text elements with accessible object attributes and/or event handlers are not exposed
Product: WebKit Reporter: Joanmarie Diggs <jdiggs>
Component: AccessibilityAssignee: Joanmarie Diggs <jdiggs>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cfleizach, commit-queue, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2
none
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
none
Patch
none
Patch
none
Patch none

Description Joanmarie Diggs 2014-11-26 15:34:01 PST
ATK fails to expose inline text elements which have accessible object attributes and/or event handlers. Examples:

* span with an onclick handler
* abbr with a title attribute
* time with a datetime attribute

These need to be separate accessible objects. The appropriate role is ATK_ROLE_STATIC, which was added to ATK v2.15.2.
Comment 1 Radar WebKit Bug Importer 2014-11-26 15:34:22 PST
<rdar://problem/19087164>
Comment 2 Joanmarie Diggs 2014-11-26 15:58:33 PST
Created attachment 242240 [details]
Patch
Comment 3 Build Bot 2014-11-26 16:58:25 PST
Comment on attachment 242240 [details]
Patch

Attachment 242240 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4580211198787584

New failing tests:
accessibility/roles-exposed.html
Comment 4 Build Bot 2014-11-26 16:58:28 PST
Created attachment 242241 [details]
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-14  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 5 Build Bot 2014-11-26 17:39:57 PST
Comment on attachment 242240 [details]
Patch

Attachment 242240 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5156600104878080

New failing tests:
accessibility/roles-exposed.html
Comment 6 Build Bot 2014-11-26 17:39:59 PST
Created attachment 242242 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 7 Joanmarie Diggs 2014-11-26 17:44:23 PST
Created attachment 242243 [details]
Patch
Comment 8 Joanmarie Diggs 2014-11-26 19:00:10 PST
Comment on attachment 242243 [details]
Patch

Note that the "expected" UNKNOWN roles are due to the need to bump the minimum ATK version in the GTK -- and EFL if they want to -- jhbuild. See bug 139070. In the meantime, this patch demonstrates that the inline text elements are now being exposed (albeit with a less-than-ideal role).
Comment 9 Joanmarie Diggs 2014-11-26 19:01:50 PST
Chris, when you get a chance, could you please review this? Thanks!
Comment 10 chris fleizach 2014-11-27 08:01:57 PST
Comment on attachment 242243 [details]
Patch

Can we make the time element accessible on its own so we don't need to check date time in the list of attributes to check against all elements? InlineRole is a bit of a strange name. I don't have a better idea though.
Comment 11 Joanmarie Diggs 2014-12-03 08:09:52 PST
Created attachment 242492 [details]
Patch
Comment 12 Joanmarie Diggs 2014-12-03 09:54:36 PST
Comment on attachment 242492 [details]
Patch

(In reply to comment #10)
> Can we make the time element accessible on its own so we don't need to check
> date time in the list of attributes to check against all elements?

Makes sense.

Related aside, that attribute also applies to <ins> and <del>. And if there is value in exposing datetime for <time> for ATs (which I gather from Steve Faulkner and others there is), I assume that value also applies to modification-related elements. So I made time + ins + del accessible on their own. (And also created a couple more roles-exposed.html items to test those.)

> InlineRole is a bit of a strange name. I don't have a better idea though.

I gave it more thought today, and I'm still at a loss. Hopefully it will not be needed all that often, so if and when a better idea appears it should be simple enough to change.
Comment 13 chris fleizach 2014-12-03 09:58:19 PST
Comment on attachment 242492 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=242492&action=review

r=me with minor update

> Source/WebCore/accessibility/AccessibilityObject.cpp:1970
> +    if (hasTagName(insTag) || hasTagName(delTag) || hasTagName(timeTag))

we can probably just write this as
return hasTagName(insTag) || hasTagName(delTag) || hasTagName(timeTag)
Comment 14 Joanmarie Diggs 2014-12-03 10:46:01 PST
Created attachment 242501 [details]
Patch
Comment 15 WebKit Commit Bot 2014-12-03 11:51:01 PST
Comment on attachment 242501 [details]
Patch

Clearing flags on attachment: 242501

Committed r176731: <http://trac.webkit.org/changeset/176731>
Comment 16 WebKit Commit Bot 2014-12-03 11:51:07 PST
All reviewed patches have been landed.  Closing bug.