Bug 87052 - AX: Contenteditable tables should always be exposed as data tables
Summary: AX: Contenteditable tables should always be exposed as data tables
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alice Boxhall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-21 15:08 PDT by Dominic Mazzoni
Modified: 2012-05-23 00:44 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.29 KB, patch)
2012-05-22 18:31 PDT, Alice Boxhall
no flags Details | Formatted Diff | Diff
Patch (4.31 KB, patch)
2012-05-22 18:49 PDT, Alice Boxhall
no flags Details | Formatted Diff | Diff
Patch (6.29 KB, patch)
2012-05-23 00:07 PDT, Alice Boxhall
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominic Mazzoni 2012-05-21 15:08:33 PDT
The AX code has heuristics that try to avoid exposing layout tables as data tables. However, when a section of the document is contentEditable, all tables should be treated as data tables, otherwise users may not be able to work with rich text editors that allow creating and editing tables.

Firefox already works this way (if it's contenteditable, all tables are data tables), I suggest WebKit follow that lead to keep things simple, unless there are any good arguments not to.
Comment 1 Alice Boxhall 2012-05-22 18:31:38 PDT
Created attachment 143428 [details]
Patch
Comment 2 WebKit Review Bot 2012-05-22 18:34:16 PDT
Attachment 143428 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/acce..." exit_code: 1
Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alice Boxhall 2012-05-22 18:49:42 PDT
Created attachment 143432 [details]
Patch
Comment 4 Dominic Mazzoni 2012-05-22 22:46:34 PDT
Don't you need to update the expected file in platform/mac/accessibility?
Comment 5 chris fleizach 2012-05-22 23:04:56 PDT
Comment on attachment 143432 [details]
Patch

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

looks like we're missing an expected file for the table-detection test

> Source/WebCore/accessibility/AccessibilityTable.cpp:99
> +    if (m_renderer->node() && m_renderer->node()->isContentEditable())

add a comment explaining why you're doing this please

> Source/WebCore/accessibility/AccessibilityTable.cpp:100
> +        return true;

you should be able to call just node() && node()->isContentEditable()

> LayoutTests/accessibility/table-detection.html:105
> +          <td nowrap="1" class="labelPol_080915_Lehman_Contributions">

probably unnecessary to include class="labelPol_080915_Lehman_Contributions"
Comment 6 Dominic Mazzoni 2012-05-22 23:14:18 PDT
(In reply to comment #5)
> probably unnecessary to include class="labelPol_080915_Lehman_Contributions"

I think this was so that it could copy a table above. My preference would be to copy something more trivial, like a table with one cell or a table with two cells but no borders - rather than this more complicated example.
Comment 7 Alice Boxhall 2012-05-22 23:27:12 PDT
Comment on attachment 143432 [details]
Patch

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

>> Source/WebCore/accessibility/AccessibilityTable.cpp:99
>> +    if (m_renderer->node() && m_renderer->node()->isContentEditable())
> 
> add a comment explaining why you're doing this please

Done.

>> Source/WebCore/accessibility/AccessibilityTable.cpp:100
>> +        return true;
> 
> you should be able to call just node() && node()->isContentEditable()

Done.

>> LayoutTests/accessibility/table-detection.html:105
>> +          <td nowrap="1" class="labelPol_080915_Lehman_Contributions">
> 
> probably unnecessary to include class="labelPol_080915_Lehman_Contributions"

Done as per Dominic's suggestion.
Comment 8 Alice Boxhall 2012-05-23 00:07:02 PDT
Created attachment 143481 [details]
Patch
Comment 9 chris fleizach 2012-05-23 00:25:59 PDT
Comment on attachment 143481 [details]
Patch

looks good
Comment 10 WebKit Review Bot 2012-05-23 00:44:46 PDT
Comment on attachment 143481 [details]
Patch

Clearing flags on attachment: 143481

Committed r118143: <http://trac.webkit.org/changeset/118143>
Comment 11 WebKit Review Bot 2012-05-23 00:44:50 PDT
All reviewed patches have been landed.  Closing bug.