Bug 107042

Summary: AX: Improve table-guessing heuristics
Product: WebKit Reporter: Dominic Mazzoni <dmazzoni>
Component: AccessibilityAssignee: Dominic Mazzoni <dmazzoni>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, jdiggs, jochen, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Dominic Mazzoni 2013-01-16 12:11:49 PST
Good example: gmail's mail conversation table is not detected as a data table in AccessibilityTable::isDataTable currently, but it clearly should be.

Ideas:
1. Call it a data table if most cells have *either* a top or bottom border, rather than requiring both - but perhaps don't do this check if the table is particularly small or has one really small dimension
2. empty-cells: show is a good clue it's a data table
3. Borrowed from Firefox: if it has col, colgroup, tfoot, or thead it's a data table
4. Borrowed from Firefox: if it has >= 20 rows it's a data table
Comment 1 Dominic Mazzoni 2013-01-17 16:29:55 PST
Created attachment 183311 [details]
Patch
Comment 2 chris fleizach 2013-01-18 09:42:30 PST
Comment on attachment 183311 [details]
Patch

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

> Source/WebCore/accessibility/AccessibilityTable.cpp:151
> +    // if there are at least 20 rows, we'll call it a data table

Full sentence with capitalization and period.

> Source/WebCore/accessibility/AccessibilityTable.cpp:223
> +            // also keep track of each individual border, so we can catch tables where most

ditto for the comments

> LayoutTests/accessibility/table-detection.html:67
> +        This should not be a table because cells have the same  colors even though there is spacing

extra space between same and colors. might as well fix it now

> LayoutTests/accessibility/table-detection.html:192
> +        This should be a table because it has a col

remember to end sentences with a period
Comment 3 Dominic Mazzoni 2013-01-18 09:59:52 PST
Created attachment 183492 [details]
Patch for landing
Comment 4 WebKit Review Bot 2013-01-18 10:49:57 PST
Comment on attachment 183492 [details]
Patch for landing

Clearing flags on attachment: 183492

Committed r140181: <http://trac.webkit.org/changeset/140181>
Comment 5 WebKit Review Bot 2013-01-18 10:50:00 PST
All reviewed patches have been landed.  Closing bug.