Bug 139005

Summary: AX: [ATK] Table captions and table rows are missing from the accessible hierarchy
Product: WebKit Reporter: Joanmarie Diggs <jdiggs>
Component: AccessibilityAssignee: Joanmarie Diggs <jdiggs>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 25531    
Attachments:
Description Flags
Patch
none
Patch none

Description Joanmarie Diggs 2014-11-22 14:45:02 PST
Given:

  <table>
    <caption>My caption</caption>
    <tr><td>1</td><td>2</td></tr>
    <tr><td>3</td><td>4</td></tr>
  </table>

Expected results: An accessible object with ATK_ROLE_CAPTION would appear as a descendant of the accessible table.

Actual results: There is no accessible object with ATK_ROLE_CAPTION (or any other role) appearing as a descendant of the accessible table.
Comment 1 Radar WebKit Bug Importer 2014-11-22 14:45:17 PST
<rdar://problem/19068639>
Comment 2 Joanmarie Diggs 2014-11-23 11:56:25 PST
Expanding the summary to include rows.

Unlike captions, which were always expected for exposure on ATK, rows were deliberately not exposed. But more and more table rows are showing up in other ATK implementations, so we might as well start exposing them. And if we're going to rework ATK table exposure, might as well do it all at once.
Comment 3 Joanmarie Diggs 2014-11-26 06:25:58 PST
Created attachment 242225 [details]
Patch
Comment 4 Joanmarie Diggs 2014-11-26 08:11:26 PST
Comment on attachment 242225 [details]
Patch

Chris and/or Mario: If either of you have time to review this, it would be awesome. (At the moment, the gtk-wk2 bot is hosed, but that's independent of this patch.)
Comment 5 chris fleizach 2014-11-27 17:09:53 PST
Comment on attachment 242225 [details]
Patch

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

> Source/WebCore/accessibility/AccessibilityTable.cpp:365
> +    Node* tableElement = m_renderer->node();

There might be a tableElement() method on AXTable. If not we should probably add one

> Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:352
> +    if (static_cast<unsigned>(index) >= children.size())

Size() returns a size_t so you might want to cast to that
Comment 6 Joanmarie Diggs 2014-12-02 14:39:15 PST
Created attachment 242450 [details]
Patch
Comment 7 Joanmarie Diggs 2014-12-02 17:12:43 PST
Comment on attachment 242450 [details]
Patch

(In reply to comment #5)
> Comment on attachment 242225 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=242225&action=review
> 
> > Source/WebCore/accessibility/AccessibilityTable.cpp:365
> > +    Node* tableElement = m_renderer->node();
> 
> There might be a tableElement() method on AXTable. If not we should probably
> add one

There is one already. Change made.

> > Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:352
> > +    if (static_cast<unsigned>(index) >= children.size())
> 
> Size() returns a size_t so you might want to cast to that

Change made.

Thanks!
Comment 8 WebKit Commit Bot 2014-12-02 18:02:23 PST
Comment on attachment 242450 [details]
Patch

Clearing flags on attachment: 242450

Committed r176706: <http://trac.webkit.org/changeset/176706>
Comment 9 WebKit Commit Bot 2014-12-02 18:02:27 PST
All reviewed patches have been landed.  Closing bug.