Bug 170424

Summary: AX: Expose link children when doing search predication on iOS
Product: WebKit Reporter: Nan Wang <n_wang>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, buildbot, cfleizach, commit-queue, dmazzoni, jcraig, jdiggs, n_wang, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
none
patch none

Description Nan Wang 2017-04-03 15:02:45 PDT
Since the children of the links are exposed on iOS instead of the link itself most of the time. We should expose the children when doing search predication.
Comment 1 Nan Wang 2017-04-03 15:07:54 PDT
<rdar://problem/31413335>
Comment 2 Nan Wang 2017-04-03 15:14:24 PDT
Created attachment 306123 [details]
patch
Comment 3 chris fleizach 2017-04-03 15:27:46 PDT
Comment on attachment 306123 [details]
patch

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

> Source/WebCore/ChangeLog:7
> +        Since the children of the links are exposed on iOS instead of the link itself

The children of links are accessible elements on iOS instead of the link itself, so we should expose the children when doing predicated searches as well.

> Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:665
> +    NSDictionary *parameterizedAttribute = searchPredicateParameterizedAttributeForSearchCriteria(context, startElement, isDirectionNext, 5, searchKey, searchText, visibleOnly, immediateDescendantsOnly);

any reason you chose five?
Comment 4 Nan Wang 2017-04-03 15:30:00 PDT
Comment on attachment 306123 [details]
patch

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

>> Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:665
>> +    NSDictionary *parameterizedAttribute = searchPredicateParameterizedAttributeForSearchCriteria(context, startElement, isDirectionNext, 5, searchKey, searchText, visibleOnly, immediateDescendantsOnly);
> 
> any reason you chose five?

I just picked a number thats greater than 1, and I think 5 should be enough for normal test cases. Do you have any suggestion ?
Comment 5 chris fleizach 2017-04-03 15:34:11 PDT
Comment on attachment 306123 [details]
patch

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

>>> Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:665
>>> +    NSDictionary *parameterizedAttribute = searchPredicateParameterizedAttributeForSearchCriteria(context, startElement, isDirectionNext, 5, searchKey, searchText, visibleOnly, immediateDescendantsOnly);
>> 
>> any reason you chose five?
> 
> I just picked a number thats greater than 1, and I think 5 should be enough for normal test cases. Do you have any suggestion ?

probably fine as is
Comment 6 Nan Wang 2017-04-03 15:37:38 PDT
Created attachment 306132 [details]
patch

updated from review
Comment 7 WebKit Commit Bot 2017-04-03 16:06:28 PDT
Comment on attachment 306132 [details]
patch

Clearing flags on attachment: 306132

Committed r214851: <http://trac.webkit.org/changeset/214851>
Comment 8 WebKit Commit Bot 2017-04-03 16:06:29 PDT
All reviewed patches have been landed.  Closing bug.