Bug 150366 - AX: Expose table size and cell indexes on iOS
Summary: AX: Expose table size and cell indexes on iOS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-10-20 10:15 PDT by Nan Wang
Modified: 2015-10-21 10:47 PDT (History)
11 users (show)

See Also:


Attachments
patch (23.42 KB, patch)
2015-10-20 13:01 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (23.44 KB, patch)
2015-10-20 23:12 PDT, Nan Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Wang 2015-10-20 10:15:25 PDT
Expose table row/column counts and ARIA 1.1 table related attributes on iOS.
Comment 1 Radar WebKit Bug Importer 2015-10-20 10:15:42 PDT
<rdar://problem/23185254>
Comment 2 Nan Wang 2015-10-20 13:01:00 PDT
Created attachment 263604 [details]
patch
Comment 3 chris fleizach 2015-10-20 16:15:59 PDT
Comment on attachment 263604 [details]
patch

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

I'm wondering

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:921
> +    for (parentTable = m_object; parentTable && !parentTable->isTable(); parentTable = parentTable->parentObject())

why the change here

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1012
> +    return rowCount > 0 ? rowCount : 0;

can we write as

return table->rowCount() > 0 ? : 0;

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1024
> +    return colCount > 0 ? colCount : 0;

ditto

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1036
> +    return rowCount > 0 ? rowCount : 0;

ditto

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1048
> +    return colCount > 0 ? colCount : 0;

ditto
Comment 4 Nan Wang 2015-10-20 16:44:56 PDT
Comment on attachment 263604 [details]
patch

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

>> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:921
>> +    for (parentTable = m_object; parentTable && !parentTable->isTable(); parentTable = parentTable->parentObject())
> 
> why the change here

in isDataTable(), it returns false when the element has ARIA role. So aria table will be considered as not a table.

>> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1012
>> +    return rowCount > 0 ? rowCount : 0;
> 
> can we write as
> 
> return table->rowCount() > 0 ? : 0;

Ok.
Comment 5 chris fleizach 2015-10-20 16:49:58 PDT
Comment on attachment 263604 [details]
patch

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

>>> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:921
>>> +    for (parentTable = m_object; parentTable && !parentTable->isTable(); parentTable = parentTable->parentObject())
>> 
>> why the change here
> 
> in isDataTable(), it returns false when the element has ARIA role. So aria table will be considered as not a table.

in that case we might want isExposableThroughAccessibility()
Comment 6 Nan Wang 2015-10-20 23:12:10 PDT
Created attachment 263662 [details]
patch

I think "table->ariaRowCount() > 0 ? : 0" is equivalent to "table->ariaRowCount > 0 ? table->ariaRowCount > 0 : 0",
which is not what we want: "table->ariaRowCount > 0 : table->ariaRowCount : 0".
So I didn't change those.
Comment 7 WebKit Commit Bot 2015-10-21 10:47:22 PDT
Comment on attachment 263662 [details]
patch

Clearing flags on attachment: 263662

Committed r191391: <http://trac.webkit.org/changeset/191391>
Comment 8 WebKit Commit Bot 2015-10-21 10:47:27 PDT
All reviewed patches have been landed.  Closing bug.