Changeset 176706 in webkit


Ignore:
Timestamp:
Dec 2, 2014 6:02:36 PM (9 years ago)
Author:
jdiggs@igalia.com
Message:

AX: [ATK] Table captions and table rows are missing from the accessible hierarchy
https://bugs.webkit.org/show_bug.cgi?id=139005

Reviewed by Chris Fleizach.

Source/WebCore:

Expose table captions and rows via ATK. Accomplishing the former is done
by role mapping and inclusion of the object as a child of the table for
ATK. Accomplishing the latter was mostly a matter of deleting all the ATK
platform code that had been forcing rows to be ignored. Because captions
are not being exposed on the Mac, they are now explicitly being ignored
for that platform.

Tests: accessibility/aria-table-hierarchy.html

accessibility/table-hierarchy.html

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::determineAccessibilityRole): Added CaptionRole.

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::addChildren): Include non-ignored captions as table children.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetNChildren): Removed special handling for tables.
(webkitAccessibleRefChild): Removed special handling for tables.
(webkitAccessibleGetIndexInParent): Removed special handling for table cells.
(atkRole): Corrected broken mapping for RowRole.
(getNChildrenForTable): Deleted.
(getChildForTable): Deleted.
(getIndexInParentForCellInRow): Deleted.

  • accessibility/mac/AccessibilityObjectMac.mm:

(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore captions as table children.

Tools:

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

Add mapping for ATK_ROLE_CAPTION to roleToString

LayoutTests:

  • accessibility/aria-table-hierarchy.html: Added.
  • accessibility/roles-exposed.html: Removed comment pointing to this bug.
  • accessibility/table-hierarchy.html: Added.
  • platform/efl/accessibility/aria-table-hierarchy-expected.txt: Added.
  • platform/efl/accessibility/roles-exposed-expected.txt: Updated to reflect new behavior.
  • platform/efl/accessibility/table-detection-expected.txt: Updated to reflect new behavior.
  • platform/efl/accessibility/table-hierarchy-expected.txt: Added.
  • platform/efl/accessibility/table-roles-hierarchy-expected.txt: Added.
  • platform/efl/accessibility/table-with-rules-expected.txt: Updated to reflect new behavior.
  • platform/gtk/accessibility/aria-table-hierarchy-expected.txt: Updated to reflect new behavior.
  • platform/gtk/accessibility/aria-table-hierarchy.html: Removed (made into a shared test).
  • platform/gtk/accessibility/caret-offsets-expected.txt: Updated to reflect new behavior.
  • platform/gtk/accessibility/caret-offsets.html: Modified to handle inclusion of rows.
  • platform/gtk/accessibility/roles-exposed-expected.txt: Updated to reflect new behavior.
  • platform/gtk/accessibility/table-detection-expected.txt: Updated to reflect new behavior.
  • platform/gtk/accessibility/table-hierarchy-expected.txt: Updated to reflect new behavior.
  • platform/gtk/accessibility/table-hierarchy.html: Removed (made into a shared test).
  • platform/gtk/accessibility/table-roles-hierarchy-expected.txt: Added.
  • platform/gtk/accessibility/table-with-rules-expected.txt: Updated to reflect new behavior.
  • platform/gtk/accessibility/text-for-range-table-cells.html: Updated to reflect new behavior.
  • platform/mac/accessibility/aria-table-hierarchy-expected.txt: Added.
  • platform/mac/accessibility/table-hierarchy-expected.txt: Added.
Location:
trunk
Files:
8 added
2 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r176674 r176706  
     12014-12-02  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] Table captions and table rows are missing from the accessible hierarchy
     4        https://bugs.webkit.org/show_bug.cgi?id=139005
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * accessibility/aria-table-hierarchy.html: Added.
     9        * accessibility/roles-exposed.html: Removed comment pointing to this bug.
     10        * accessibility/table-hierarchy.html: Added.
     11        * platform/efl/accessibility/aria-table-hierarchy-expected.txt: Added.
     12        * platform/efl/accessibility/roles-exposed-expected.txt: Updated to reflect new behavior.
     13        * platform/efl/accessibility/table-detection-expected.txt: Updated to reflect new behavior.
     14        * platform/efl/accessibility/table-hierarchy-expected.txt: Added.
     15        * platform/efl/accessibility/table-roles-hierarchy-expected.txt: Added.
     16        * platform/efl/accessibility/table-with-rules-expected.txt: Updated to reflect new behavior.
     17        * platform/gtk/accessibility/aria-table-hierarchy-expected.txt: Updated to reflect new behavior.
     18        * platform/gtk/accessibility/aria-table-hierarchy.html: Removed (made into a shared test).
     19        * platform/gtk/accessibility/caret-offsets-expected.txt: Updated to reflect new behavior.
     20        * platform/gtk/accessibility/caret-offsets.html: Modified to handle inclusion of rows.
     21        * platform/gtk/accessibility/roles-exposed-expected.txt: Updated to reflect new behavior.
     22        * platform/gtk/accessibility/table-detection-expected.txt: Updated to reflect new behavior.
     23        * platform/gtk/accessibility/table-hierarchy-expected.txt: Updated to reflect new behavior.
     24        * platform/gtk/accessibility/table-hierarchy.html: Removed (made into a shared test).
     25        * platform/gtk/accessibility/table-roles-hierarchy-expected.txt: Added.
     26        * platform/gtk/accessibility/table-with-rules-expected.txt: Updated to reflect new behavior.
     27        * platform/gtk/accessibility/text-for-range-table-cells.html: Updated to reflect new behavior.
     28        * platform/mac/accessibility/aria-table-hierarchy-expected.txt: Added.
     29        * platform/mac/accessibility/table-hierarchy-expected.txt: Added.
     30
    1312014-12-02  Chris Dumez  <cdumez@apple.com>
    232
  • trunk/LayoutTests/accessibility/roles-exposed.html

    r176552 r176706  
    140140
    141141<table data-platform="atk,mac" class="ex">
    142     <!-- [ATK] Object not exposed (webkit.org/b/139005) --><caption data-platform="atk,mac" class="ex">X</caption>
     142    <caption data-platform="atk,mac" class="ex">X</caption>
    143143    <thead data-platform="atk,mac" class="ex">
    144144        <!-- [ATK] Object not exposed (webkit.org/b/139005) --><tr data-platform="atk,mac" class="ex">
  • trunk/LayoutTests/platform/efl/accessibility/roles-exposed-expected.txt

    r176552 r176706  
    285285     
    286286caption
    287       AXRole:
     287      AXRole: AXCaption
    288288     
    289289thead
     
    291291     
    292292tr
    293       AXRole:
     293      AXRole: AXRow
    294294     
    295295th
     
    300300     
    301301tr
    302       AXRole:
     302      AXRole: AXRow
    303303     
    304304td
     
    309309     
    310310tr
    311       AXRole:
     311      AXRole: AXRow
    312312     
    313313th
     
    420420     
    421421div[role=row]
    422       AXRole:
     422      AXRole: AXRow
    423423     
    424424div[role=rowheader]
     
    570570     
    571571div[role=row]
    572       AXRole:
     572      AXRole: AXRow
    573573     
    574574div[role=rowheader]
  • trunk/LayoutTests/platform/efl/accessibility/table-detection-expected.txt

    r174567 r176706  
    44AXRole: AXTable
    55AXParent: AXWebArea
    6 AXChildren: 4
     6AXChildren: 2
    77AXPosition: { 0.000000, 0.000000 }
    88AXSize: { 62.000000, 47.000000 }
     
    2727AXRole: AXTable
    2828AXParent: AXWebArea
     29AXChildren: 1
     30AXPosition: { 0.000000, 0.000000 }
     31AXSize: { 68.000000, 29.000000 }
     32AXTitle:
     33AXDescription:
     34AXFocusable: 0
     35AXFocused: 0
     36AXSelectable: 0
     37AXSelected: 0
     38AXMultiSelectable: 0
     39AXEnabled: 1
     40AXExpanded: 0
     41AXRequired: 0
     42AXChecked: 0
     43AXPlatformAttributes: toolkit:WebKitEfl
     44
     45asdf    asdf
     46
     47This should not be a table because its cells do not have borders.
     48
     49AXRole: AXTable
     50AXParent: AXWebArea
     51AXChildren: 1
     52AXPosition: { 0.000000, 0.000000 }
     53AXSize: { 64.000000, 27.000000 }
     54AXTitle:
     55AXDescription:
     56AXFocusable: 0
     57AXFocused: 0
     58AXSelectable: 0
     59AXSelected: 0
     60AXMultiSelectable: 0
     61AXEnabled: 1
     62AXExpanded: 0
     63AXRequired: 0
     64AXChecked: 0
     65AXPlatformAttributes: layout-guess:true, toolkit:WebKitEfl
     66
     67asdf    asdf
     68
     69This should be a table because a cell has a special attribute
     70
     71AXRole: AXTable
     72AXParent: AXWebArea
     73AXChildren: 1
     74AXPosition: { 0.000000, 0.000000 }
     75AXSize: { 58.000000, 23.000000 }
     76AXTitle:
     77AXDescription:
     78AXFocusable: 0
     79AXFocused: 0
     80AXSelectable: 0
     81AXSelected: 0
     82AXMultiSelectable: 0
     83AXEnabled: 1
     84AXExpanded: 0
     85AXRequired: 0
     86AXChecked: 0
     87AXPlatformAttributes: toolkit:WebKitEfl
     88
     89asdf    asdf
     90
     91This should be a table because a cell has a special attribute.
     92
     93AXRole: AXTable
     94AXParent: AXWebArea
     95AXChildren: 1
     96AXPosition: { 0.000000, 0.000000 }
     97AXSize: { 58.000000, 23.000000 }
     98AXTitle:
     99AXDescription:
     100AXFocusable: 0
     101AXFocused: 0
     102AXSelectable: 0
     103AXSelected: 0
     104AXMultiSelectable: 0
     105AXEnabled: 1
     106AXExpanded: 0
     107AXRequired: 0
     108AXChecked: 0
     109AXPlatformAttributes: toolkit:WebKitEfl
     110
     111asdf    asdf
     112
     113This should be a table because a cell has a special attribute.
     114
     115AXRole: AXTable
     116AXParent: AXWebArea
    29117AXChildren: 2
    30118AXPosition: { 0.000000, 0.000000 }
    31 AXSize: { 68.000000, 29.000000 }
    32 AXTitle:
    33 AXDescription:
    34 AXFocusable: 0
    35 AXFocused: 0
    36 AXSelectable: 0
    37 AXSelected: 0
    38 AXMultiSelectable: 0
    39 AXEnabled: 1
    40 AXExpanded: 0
    41 AXRequired: 0
    42 AXChecked: 0
    43 AXPlatformAttributes: toolkit:WebKitEfl
    44 
    45 asdf    asdf
    46 
    47 This should not be a table because its cells do not have borders.
    48 
    49 AXRole: AXTable
    50 AXParent: AXWebArea
    51 AXChildren: 2
    52 AXPosition: { 0.000000, 0.000000 }
    53 AXSize: { 64.000000, 27.000000 }
    54 AXTitle:
    55 AXDescription:
    56 AXFocusable: 0
    57 AXFocused: 0
    58 AXSelectable: 0
    59 AXSelected: 0
    60 AXMultiSelectable: 0
    61 AXEnabled: 1
    62 AXExpanded: 0
    63 AXRequired: 0
    64 AXChecked: 0
    65 AXPlatformAttributes: layout-guess:true, toolkit:WebKitEfl
    66 
    67 asdf    asdf
    68 
    69 This should be a table because a cell has a special attribute
    70 
    71 AXRole: AXTable
    72 AXParent: AXWebArea
    73 AXChildren: 2
     119AXSize: { 58.000000, 43.000000 }
     120AXTitle:
     121AXDescription:
     122AXFocusable: 0
     123AXFocused: 0
     124AXSelectable: 0
     125AXSelected: 0
     126AXMultiSelectable: 0
     127AXEnabled: 1
     128AXExpanded: 0
     129AXRequired: 0
     130AXChecked: 0
     131AXPlatformAttributes: toolkit:WebKitEfl
     132
     133asdf    asdf
     134asdf    asdf
     135
     136This should be a table because cells have different colors.
     137
     138AXRole: AXTable
     139AXParent: AXWebArea
     140AXChildren: 1
    74141AXPosition: { 0.000000, 0.000000 }
    75142AXSize: { 58.000000, 23.000000 }
     
    89156asdf    asdf
    90157
    91 This should be a table because a cell has a special attribute.
    92 
    93 AXRole: AXTable
    94 AXParent: AXWebArea
    95 AXChildren: 2
    96 AXPosition: { 0.000000, 0.000000 }
    97 AXSize: { 58.000000, 23.000000 }
    98 AXTitle:
    99 AXDescription:
    100 AXFocusable: 0
    101 AXFocused: 0
    102 AXSelectable: 0
    103 AXSelected: 0
    104 AXMultiSelectable: 0
    105 AXEnabled: 1
    106 AXExpanded: 0
    107 AXRequired: 0
    108 AXChecked: 0
    109 AXPlatformAttributes: toolkit:WebKitEfl
    110 
    111 asdf    asdf
    112 
    113 This should be a table because a cell has a special attribute.
    114 
    115 AXRole: AXTable
    116 AXParent: AXWebArea
    117 AXChildren: 4
    118 AXPosition: { 0.000000, 0.000000 }
    119 AXSize: { 58.000000, 43.000000 }
    120 AXTitle:
    121 AXDescription:
    122 AXFocusable: 0
    123 AXFocused: 0
    124 AXSelectable: 0
    125 AXSelected: 0
    126 AXMultiSelectable: 0
    127 AXEnabled: 1
    128 AXExpanded: 0
    129 AXRequired: 0
    130 AXChecked: 0
    131 AXPlatformAttributes: toolkit:WebKitEfl
    132 
    133 asdf    asdf
    134 asdf    asdf
    135 
    136 This should be a table because cells have different colors.
    137 
    138 AXRole: AXTable
    139 AXParent: AXWebArea
    140 AXChildren: 2
    141 AXPosition: { 0.000000, 0.000000 }
    142 AXSize: { 58.000000, 23.000000 }
    143 AXTitle:
    144 AXDescription:
    145 AXFocusable: 0
    146 AXFocused: 0
    147 AXSelectable: 0
    148 AXSelected: 0
    149 AXMultiSelectable: 0
    150 AXEnabled: 1
    151 AXExpanded: 0
    152 AXRequired: 0
    153 AXChecked: 0
    154 AXPlatformAttributes: toolkit:WebKitEfl
    155 
    156 asdf    asdf
    157 
    158158This should not be a table because cells have different but no spacing.
    159159
    160160AXRole: AXTable
    161161AXParent: AXWebArea
    162 AXChildren: 2
     162AXChildren: 1
    163163AXPosition: { 0.000000, 0.000000 }
    164164AXSize: { 52.000000, 19.000000 }
     
    182182AXRole: AXTable
    183183AXParent: AXWebArea
    184 AXChildren: 2
     184AXChildren: 1
    185185AXPosition: { 0.000000, 0.000000 }
    186186AXSize: { 61.000000, 25.000000 }
     
    204204AXRole: AXTable
    205205AXParent: AXWebArea
    206 AXChildren: 2
     206AXChildren: 1
    207207AXPosition: { 0.000000, 0.000000 }
    208208AXSize: { 53.000000, 19.000000 }
     
    226226AXRole: AXTable
    227227AXParent: AXWebArea
    228 AXChildren: 2
     228AXChildren: 1
    229229AXPosition: { 0.000000, 0.000000 }
    230230AXSize: { 769.000000, 27.000000 }
     
    276276AXRole: AXTable
    277277AXParent: AXWebArea
     278AXChildren: 1
     279AXPosition: { 0.000000, 0.000000 }
     280AXSize: { 64.000000, 27.000000 }
     281AXTitle:
     282AXDescription:
     283AXFocusable: 1
     284AXFocused: 0
     285AXSelectable: 0
     286AXSelected: 0
     287AXMultiSelectable: 0
     288AXEnabled: 1
     289AXExpanded: 0
     290AXRequired: 0
     291AXChecked: 0
     292AXPlatformAttributes: toolkit:WebKitEfl
     293
     294asdf    asdf
     295
     296This should be a table because most cells have a top border.
     297
     298AXRole: AXTable
     299AXParent: AXWebArea
    278300AXChildren: 2
    279301AXPosition: { 0.000000, 0.000000 }
    280 AXSize: { 64.000000, 27.000000 }
    281 AXTitle:
    282 AXDescription:
    283 AXFocusable: 1
    284 AXFocused: 0
    285 AXSelectable: 0
    286 AXSelected: 0
    287 AXMultiSelectable: 0
    288 AXEnabled: 1
    289 AXExpanded: 0
    290 AXRequired: 0
    291 AXChecked: 0
    292 AXPlatformAttributes: toolkit:WebKitEfl
    293 
    294 asdf    asdf
    295 
    296 This should be a table because most cells have a top border.
     302AXSize: { 62.000000, 49.000000 }
     303AXTitle:
     304AXDescription:
     305AXFocusable: 0
     306AXFocused: 0
     307AXSelectable: 0
     308AXSelected: 0
     309AXMultiSelectable: 0
     310AXEnabled: 1
     311AXExpanded: 0
     312AXRequired: 0
     313AXChecked: 0
     314AXPlatformAttributes: toolkit:WebKitEfl
     315
     316asdf    asdf
     317asdf    asdf
     318
     319This should not be a table because cells have different borders.
     320
     321AXRole: AXTable
     322AXParent: AXWebArea
     323AXChildren: 2
     324AXPosition: { 0.000000, 0.000000 }
     325AXSize: { 62.000000, 47.000000 }
     326AXTitle:
     327AXDescription:
     328AXFocusable: 0
     329AXFocused: 0
     330AXSelectable: 0
     331AXSelected: 0
     332AXMultiSelectable: 0
     333AXEnabled: 1
     334AXExpanded: 0
     335AXRequired: 0
     336AXChecked: 0
     337AXPlatformAttributes: layout-guess:true, toolkit:WebKitEfl
     338
     339asdf    asdf
     340asdf    asdf
     341
     342This should be a table because it sets empty-cells: hide on the table.
     343
     344AXRole: AXTable
     345AXParent: AXWebArea
     346AXChildren: 3
     347AXPosition: { 0.000000, 0.000000 }
     348AXSize: { 64.000000, 70.000000 }
     349AXTitle:
     350AXDescription:
     351AXFocusable: 0
     352AXFocused: 0
     353AXSelectable: 0
     354AXSelected: 0
     355AXMultiSelectable: 0
     356AXEnabled: 1
     357AXExpanded: 0
     358AXRequired: 0
     359AXChecked: 0
     360AXPlatformAttributes: toolkit:WebKitEfl
     361
     362asdf    asdf
     363asdf
     364asdf    asdf
     365
     366This should be a table because it sets empty-cells: hide on a cell.
     367
     368AXRole: AXTable
     369AXParent: AXWebArea
     370AXChildren: 3
     371AXPosition: { 0.000000, 0.000000 }
     372AXSize: { 64.000000, 71.000000 }
     373AXTitle:
     374AXDescription:
     375AXFocusable: 0
     376AXFocused: 0
     377AXSelectable: 0
     378AXSelected: 0
     379AXMultiSelectable: 0
     380AXEnabled: 1
     381AXExpanded: 0
     382AXRequired: 0
     383AXChecked: 0
     384AXPlatformAttributes: toolkit:WebKitEfl
     385
     386asdf    asdf
     387asdf
     388asdf    asdf
     389
     390This should be a table because it has a col.
     391
     392AXRole: AXTable
     393AXParent: AXWebArea
     394AXChildren: 2
     395AXPosition: { 0.000000, 0.000000 }
     396AXSize: { 62.000000, 47.000000 }
     397AXTitle:
     398AXDescription:
     399AXFocusable: 0
     400AXFocused: 0
     401AXSelectable: 0
     402AXSelected: 0
     403AXMultiSelectable: 0
     404AXEnabled: 1
     405AXExpanded: 0
     406AXRequired: 0
     407AXChecked: 0
     408AXPlatformAttributes: toolkit:WebKitEfl
     409
     410asdf    asdf
     411asdf    asdf
     412
     413This should be a table because it has at least 20 rows
     414
     415AXRole: AXTable
     416AXParent: AXWebArea
     417AXChildren: 24
     418AXPosition: { 0.000000, 0.000000 }
     419AXSize: { 32.000000, 531.000000 }
     420AXTitle:
     421AXDescription:
     422AXFocusable: 0
     423AXFocused: 0
     424AXSelectable: 0
     425AXSelected: 0
     426AXMultiSelectable: 0
     427AXEnabled: 1
     428AXExpanded: 0
     429AXRequired: 0
     430AXChecked: 0
     431AXPlatformAttributes: toolkit:WebKitEfl
     432
     433asdf
     434asdf
     435asdf
     436asdf
     437asdf
     438asdf
     439asdf
     440asdf
     441asdf
     442asdf
     443asdf
     444asdf
     445asdf
     446asdf
     447asdf
     448asdf
     449asdf
     450asdf
     451asdf
     452asdf
     453asdf
     454asdf
     455asdf
     456asdf
     457
     458This should be a table even though it uses table-row-group for it's display type.
    297459
    298460AXRole: AXTable
     
    300462AXChildren: 4
    301463AXPosition: { 0.000000, 0.000000 }
    302 AXSize: { 62.000000, 49.000000 }
    303 AXTitle:
    304 AXDescription:
    305 AXFocusable: 0
    306 AXFocused: 0
    307 AXSelectable: 0
    308 AXSelected: 0
    309 AXMultiSelectable: 0
    310 AXEnabled: 1
    311 AXExpanded: 0
    312 AXRequired: 0
    313 AXChecked: 0
    314 AXPlatformAttributes: toolkit:WebKitEfl
    315 
    316 asdf    asdf
    317 asdf    asdf
    318 
    319 This should not be a table because cells have different borders.
    320 
    321 AXRole: AXTable
    322 AXParent: AXWebArea
    323 AXChildren: 4
    324 AXPosition: { 0.000000, 0.000000 }
    325 AXSize: { 62.000000, 47.000000 }
    326 AXTitle:
    327 AXDescription:
    328 AXFocusable: 0
    329 AXFocused: 0
    330 AXSelectable: 0
    331 AXSelected: 0
    332 AXMultiSelectable: 0
    333 AXEnabled: 1
    334 AXExpanded: 0
    335 AXRequired: 0
    336 AXChecked: 0
    337 AXPlatformAttributes: layout-guess:true, toolkit:WebKitEfl
    338 
    339 asdf    asdf
    340 asdf    asdf
    341 
    342 This should be a table because it sets empty-cells: hide on the table.
    343 
    344 AXRole: AXTable
    345 AXParent: AXWebArea
    346 AXChildren: 6
    347 AXPosition: { 0.000000, 0.000000 }
    348 AXSize: { 64.000000, 70.000000 }
    349 AXTitle:
    350 AXDescription:
    351 AXFocusable: 0
    352 AXFocused: 0
    353 AXSelectable: 0
    354 AXSelected: 0
    355 AXMultiSelectable: 0
    356 AXEnabled: 1
    357 AXExpanded: 0
    358 AXRequired: 0
    359 AXChecked: 0
    360 AXPlatformAttributes: toolkit:WebKitEfl
    361 
    362 asdf    asdf
    363 asdf
    364 asdf    asdf
    365 
    366 This should be a table because it sets empty-cells: hide on a cell.
    367 
    368 AXRole: AXTable
    369 AXParent: AXWebArea
    370 AXChildren: 6
    371 AXPosition: { 0.000000, 0.000000 }
    372 AXSize: { 64.000000, 71.000000 }
    373 AXTitle:
    374 AXDescription:
    375 AXFocusable: 0
    376 AXFocused: 0
    377 AXSelectable: 0
    378 AXSelected: 0
    379 AXMultiSelectable: 0
    380 AXEnabled: 1
    381 AXExpanded: 0
    382 AXRequired: 0
    383 AXChecked: 0
    384 AXPlatformAttributes: toolkit:WebKitEfl
    385 
    386 asdf    asdf
    387 asdf
    388 asdf    asdf
    389 
    390 This should be a table because it has a col.
    391 
    392 AXRole: AXTable
    393 AXParent: AXWebArea
    394 AXChildren: 4
    395 AXPosition: { 0.000000, 0.000000 }
    396 AXSize: { 62.000000, 47.000000 }
    397 AXTitle:
    398 AXDescription:
    399 AXFocusable: 0
    400 AXFocused: 0
    401 AXSelectable: 0
    402 AXSelected: 0
    403 AXMultiSelectable: 0
    404 AXEnabled: 1
    405 AXExpanded: 0
    406 AXRequired: 0
    407 AXChecked: 0
    408 AXPlatformAttributes: toolkit:WebKitEfl
    409 
    410 asdf    asdf
    411 asdf    asdf
    412 
    413 This should be a table because it has at least 20 rows
    414 
    415 AXRole: AXTable
    416 AXParent: AXWebArea
    417 AXChildren: 24
    418 AXPosition: { 0.000000, 0.000000 }
    419 AXSize: { 32.000000, 531.000000 }
    420 AXTitle:
    421 AXDescription:
    422 AXFocusable: 0
    423 AXFocused: 0
    424 AXSelectable: 0
    425 AXSelected: 0
    426 AXMultiSelectable: 0
    427 AXEnabled: 1
    428 AXExpanded: 0
    429 AXRequired: 0
    430 AXChecked: 0
    431 AXPlatformAttributes: toolkit:WebKitEfl
    432 
    433 asdf
    434 asdf
    435 asdf
    436 asdf
    437 asdf
    438 asdf
    439 asdf
    440 asdf
    441 asdf
    442 asdf
    443 asdf
    444 asdf
    445 asdf
    446 asdf
    447 asdf
    448 asdf
    449 asdf
    450 asdf
    451 asdf
    452 asdf
    453 asdf
    454 asdf
    455 asdf
    456 asdf
    457 
    458 This should be a table even though it uses table-row-group for it's display type.
    459 
    460 AXRole: AXTable
    461 AXParent: AXWebArea
    462 AXChildren: 4
    463 AXPosition: { 0.000000, 0.000000 }
    464464AXSize: { 84.000000, 47.000000 }
    465465AXTitle:
  • trunk/LayoutTests/platform/efl/accessibility/table-with-rules-expected.txt

    r170290 r176706  
    88AXRole: AXTable
    99AXParent: AXWebArea
    10 AXChildren: 2
     10AXChildren: 1
    1111AXPosition: { 0.000000, 0.000000 }
    1212AXSize: { 57.000000, 20.000000 }
     
    2626AXRole: AXTable
    2727AXParent: AXWebArea
    28 AXChildren: 2
     28AXChildren: 1
    2929AXPosition: { 0.000000, 0.000000 }
    3030AXSize: { 62.000000, 24.000000 }
     
    4444AXRole: AXTable
    4545AXParent: AXWebArea
    46 AXChildren: 2
     46AXChildren: 1
    4747AXPosition: { 0.000000, 0.000000 }
    4848AXSize: { 56.000000, 20.000000 }
     
    6262AXRole: AXTable
    6363AXParent: AXWebArea
    64 AXChildren: 2
     64AXChildren: 1
    6565AXPosition: { 0.000000, 0.000000 }
    6666AXSize: { 62.000000, 24.000000 }
  • trunk/LayoutTests/platform/gtk/accessibility/aria-table-hierarchy-expected.txt

    r174697 r176706  
    19194
    2020
    21 This tests the Atk table hierarhy for an ARIA table.
     21End of test
     22This tests the accessible hierarchy for an ARIA table.
    2223
    2324On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    2425
    2526
    26 PASS table1.role is 'AXRole: AXTable'
    27 PASS table1.rowCount is 1
    28 PASS table1.columnCount is 2
    29 PASS table2.role is 'AXRole: AXTable'
    30 PASS table2.rowCount is 3
    31 PASS table2.columnCount is 2
    32 PASS table3.role is 'AXRole: AXTable'
    33 PASS table3.rowCount is 1
    34 PASS table3.columnCount is 2
    35 PASS table4.role is 'AXRole: AXTable'
    36 PASS table4.rowCount is 3
    37 PASS table4.columnCount is 2
    38 PASS children is 2
    39 PASS table1.childAtIndex(i).role is 'AXRole: AXCell'
    40 PASS table1.childAtIndex(i).role is 'AXRole: AXCell'
    41 PASS children is 6
    42 PASS table2.childAtIndex(0).role is 'AXRole: AXColumnHeader'
    43 PASS table2.childAtIndex(1).role is 'AXRole: AXColumnHeader'
    44 PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
    45 PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
    46 PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
    47 PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
    48 PASS children is 2
    49 PASS table3.childAtIndex(i).role is 'AXRole: AXCell'
    50 PASS table3.childAtIndex(i).role is 'AXRole: AXCell'
    51 PASS children is 6
    52 PASS table4.childAtIndex(0).role is 'AXRole: AXColumnHeader'
    53 PASS table4.childAtIndex(1).role is 'AXRole: AXColumnHeader'
    54 PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
    55 PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
    56 PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
    57 PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
     27AXRole: AXWebArea
     28  AXRole: AXTable
     29    AXRole: AXRow
     30      AXRole: AXCell AXValue: foo
     31      AXRole: AXCell AXValue: bar
     32  AXRole: AXTable
     33    AXRole: AXRow
     34      AXRole: AXColumnHeader AXValue: Odd
     35      AXRole: AXColumnHeader AXValue: Even
     36    AXRole: AXRow
     37      AXRole: AXCell AXValue: 1
     38      AXRole: AXCell AXValue: 2
     39    AXRole: AXRow
     40      AXRole: AXCell AXValue: 3
     41      AXRole: AXCell AXValue: 4
     42  AXRole: AXTable
     43    AXRole: AXRow
     44      AXRole: AXCell AXValue: hello
     45      AXRole: AXCell AXValue: world
     46  AXRole: AXTable
     47    AXRole: AXRow
     48      AXRole: AXColumnHeader AXValue: Odd
     49      AXRole: AXColumnHeader AXValue: Even
     50    AXRole: AXRow
     51      AXRole: AXCell AXValue: 1<\n><\n>
     52        AXRole: AXParagraph AXValue: 1
     53      AXRole: AXCell AXValue: 2<\n><\n>
     54        AXRole: AXParagraph AXValue: 2
     55    AXRole: AXRow
     56      AXRole: AXCell AXValue: 3<\n><\n>
     57        AXRole: AXParagraph AXValue: 3
     58      AXRole: AXCell AXValue: 4<\n><\n>
     59        AXRole: AXParagraph AXValue: 4
    5860PASS successfullyParsed is true
    5961
  • trunk/LayoutTests/platform/gtk/accessibility/caret-offsets-expected.txt

    r169483 r176706  
    3939PASS caretMovedData is "TextField|5"
    4040PASS table.role is "AXRole: AXTable"
    41 PASS table.childrenCount is 4
     41PASS table.childrenCount is 1
     42PASS row.role is "AXRole: AXRow"
    4243PASS tableCell.role is "AXRole: AXCell"
    4344PASS caretMovedData is "Cell|2"
  • trunk/LayoutTests/platform/gtk/accessibility/caret-offsets.html

    r169483 r176706  
    106106    table = root.childAtIndex(4);
    107107    shouldBeEqualToString('table.role', 'AXRole: AXTable');
    108     shouldBe('table.childrenCount', '4');
    109     tableCell = table.childAtIndex(0);
     108    shouldBe('table.childrenCount', '1');
     109    row = table.childAtIndex(0);
     110    shouldBeEqualToString('row.role', 'AXRole: AXRow');
     111    tableCell = row.childAtIndex(0);
    110112    shouldBeEqualToString('tableCell.role', 'AXRole: AXCell');
    111113    resetCaretOffsetForObject(tableCell, 2);
  • trunk/LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt

    r176552 r176706  
    285285     
    286286caption
    287       AXRole:
     287      AXRole: AXCaption
    288288     
    289289thead
     
    291291     
    292292tr
    293       AXRole:
     293      AXRole: AXRow
    294294     
    295295th
     
    300300     
    301301tr
    302       AXRole:
     302      AXRole: AXRow
    303303     
    304304td
     
    309309     
    310310tr
    311       AXRole:
     311      AXRole: AXRow
    312312     
    313313th
     
    420420     
    421421div[role=row]
    422       AXRole:
     422      AXRole: AXRow
    423423     
    424424div[role=rowheader]
     
    570570     
    571571div[role=row]
    572       AXRole:
     572      AXRole: AXRow
    573573     
    574574div[role=rowheader]
  • trunk/LayoutTests/platform/gtk/accessibility/table-detection-expected.txt

    r165974 r176706  
    44AXRole: AXTable
    55AXParent: AXWebArea
    6 AXChildren: 4
     6AXChildren: 2
    77AXPosition: { 8.000000, 66.000000 }
    88AXSize: { 62.000000, 45.000000 }
     
    2727AXRole: AXTable
    2828AXParent: AXWebArea
    29 AXChildren: 2
     29AXChildren: 1
    3030AXPosition: { 8.000000, 484.000000 }
    3131AXSize: { 68.000000, 28.000000 }
     
    4949AXRole: AXTable
    5050AXParent: AXWebArea
    51 AXChildren: 2
     51AXChildren: 1
    5252AXPosition: { 8.000000, 332.000000 }
    5353AXSize: { 64.000000, 26.000000 }
     
    7171AXRole: AXTable
    7272AXParent: AXWebArea
     73AXChildren: 1
     74AXPosition: { 8.000000, 333.000000 }
     75AXSize: { 58.000000, 22.000000 }
     76AXTitle:
     77AXDescription:
     78AXFocusable: 0
     79AXFocused: 0
     80AXSelectable: 0
     81AXSelected: 0
     82AXMultiSelectable: 0
     83AXEnabled: 1
     84AXExpanded: 0
     85AXRequired: 0
     86AXChecked: 0
     87AXPlatformAttributes: toolkit:WebKitGtk
     88
     89asdf    asdf
     90
     91This should be a table because a cell has a special attribute.
     92
     93AXRole: AXTable
     94AXParent: AXWebArea
     95AXChildren: 1
     96AXPosition: { 8.000000, 333.000000 }
     97AXSize: { 58.000000, 22.000000 }
     98AXTitle:
     99AXDescription:
     100AXFocusable: 0
     101AXFocused: 0
     102AXSelectable: 0
     103AXSelected: 0
     104AXMultiSelectable: 0
     105AXEnabled: 1
     106AXExpanded: 0
     107AXRequired: 0
     108AXChecked: 0
     109AXPlatformAttributes: toolkit:WebKitGtk
     110
     111asdf    asdf
     112
     113This should be a table because a cell has a special attribute.
     114
     115AXRole: AXTable
     116AXParent: AXWebArea
    73117AXChildren: 2
    74118AXPosition: { 8.000000, 333.000000 }
     119AXSize: { 58.000000, 41.000000 }
     120AXTitle:
     121AXDescription:
     122AXFocusable: 0
     123AXFocused: 0
     124AXSelectable: 0
     125AXSelected: 0
     126AXMultiSelectable: 0
     127AXEnabled: 1
     128AXExpanded: 0
     129AXRequired: 0
     130AXChecked: 0
     131AXPlatformAttributes: toolkit:WebKitGtk
     132
     133asdf    asdf
     134asdf    asdf
     135
     136This should be a table because cells have different colors.
     137
     138AXRole: AXTable
     139AXParent: AXWebArea
     140AXChildren: 1
     141AXPosition: { 8.000000, 333.000000 }
    75142AXSize: { 58.000000, 22.000000 }
    76143AXTitle:
     
    89156asdf    asdf
    90157
    91 This should be a table because a cell has a special attribute.
    92 
    93 AXRole: AXTable
    94 AXParent: AXWebArea
    95 AXChildren: 2
    96 AXPosition: { 8.000000, 333.000000 }
    97 AXSize: { 58.000000, 22.000000 }
    98 AXTitle:
    99 AXDescription:
    100 AXFocusable: 0
    101 AXFocused: 0
    102 AXSelectable: 0
    103 AXSelected: 0
    104 AXMultiSelectable: 0
    105 AXEnabled: 1
    106 AXExpanded: 0
    107 AXRequired: 0
    108 AXChecked: 0
    109 AXPlatformAttributes: toolkit:WebKitGtk
    110 
    111 asdf    asdf
    112 
    113 This should be a table because a cell has a special attribute.
    114 
    115 AXRole: AXTable
    116 AXParent: AXWebArea
    117 AXChildren: 4
    118 AXPosition: { 8.000000, 333.000000 }
    119 AXSize: { 58.000000, 41.000000 }
    120 AXTitle:
    121 AXDescription:
    122 AXFocusable: 0
    123 AXFocused: 0
    124 AXSelectable: 0
    125 AXSelected: 0
    126 AXMultiSelectable: 0
    127 AXEnabled: 1
    128 AXExpanded: 0
    129 AXRequired: 0
    130 AXChecked: 0
    131 AXPlatformAttributes: toolkit:WebKitGtk
    132 
    133 asdf    asdf
    134 asdf    asdf
    135 
    136 This should be a table because cells have different colors.
    137 
    138 AXRole: AXTable
    139 AXParent: AXWebArea
    140 AXChildren: 2
    141 AXPosition: { 8.000000, 333.000000 }
    142 AXSize: { 58.000000, 22.000000 }
    143 AXTitle:
    144 AXDescription:
    145 AXFocusable: 0
    146 AXFocused: 0
    147 AXSelectable: 0
    148 AXSelected: 0
    149 AXMultiSelectable: 0
    150 AXEnabled: 1
    151 AXExpanded: 0
    152 AXRequired: 0
    153 AXChecked: 0
    154 AXPlatformAttributes: toolkit:WebKitGtk
    155 
    156 asdf    asdf
    157 
    158158This should not be a table because cells have different but no spacing.
    159159
    160160AXRole: AXTable
    161161AXParent: AXWebArea
    162 AXChildren: 2
     162AXChildren: 1
    163163AXPosition: { 8.000000, 333.000000 }
    164164AXSize: { 52.000000, 18.000000 }
     
    182182AXRole: AXTable
    183183AXParent: AXWebArea
    184 AXChildren: 2
     184AXChildren: 1
    185185AXPosition: { 8.000000, 346.000000 }
    186186AXSize: { 61.000000, 24.000000 }
     
    204204AXRole: AXTable
    205205AXParent: AXWebArea
    206 AXChildren: 2
     206AXChildren: 1
    207207AXPosition: { 8.000000, 333.000000 }
    208208AXSize: { 53.000000, 18.000000 }
     
    226226AXRole: AXTable
    227227AXParent: AXWebArea
    228 AXChildren: 2
     228AXChildren: 1
    229229AXPosition: { 8.000000, 346.000000 }
    230230AXSize: { 769.000000, 27.000000 }
     
    276276AXRole: AXTable
    277277AXParent: AXWebArea
     278AXChildren: 1
     279AXPosition: { 8.000000, 333.000000 }
     280AXSize: { 64.000000, 26.000000 }
     281AXTitle:
     282AXDescription:
     283AXFocusable: 1
     284AXFocused: 0
     285AXSelectable: 0
     286AXSelected: 0
     287AXMultiSelectable: 0
     288AXEnabled: 1
     289AXExpanded: 0
     290AXRequired: 0
     291AXChecked: 0
     292AXPlatformAttributes: toolkit:WebKitGtk
     293
     294asdf    asdf
     295
     296This should be a table because most cells have a top border.
     297
     298AXRole: AXTable
     299AXParent: AXWebArea
    278300AXChildren: 2
    279301AXPosition: { 8.000000, 333.000000 }
    280 AXSize: { 64.000000, 26.000000 }
    281 AXTitle:
    282 AXDescription:
    283 AXFocusable: 1
    284 AXFocused: 0
    285 AXSelectable: 0
    286 AXSelected: 0
    287 AXMultiSelectable: 0
    288 AXEnabled: 1
    289 AXExpanded: 0
    290 AXRequired: 0
    291 AXChecked: 0
    292 AXPlatformAttributes: toolkit:WebKitGtk
    293 
    294 asdf    asdf
    295 
    296 This should be a table because most cells have a top border.
    297 
    298 AXRole: AXTable
    299 AXParent: AXWebArea
    300 AXChildren: 4
    301 AXPosition: { 8.000000, 333.000000 }
    302302AXSize: { 62.000000, 47.000000 }
    303303AXTitle:
     
    321321AXRole: AXTable
    322322AXParent: AXWebArea
    323 AXChildren: 4
     323AXChildren: 2
    324324AXPosition: { 8.000000, 333.000000 }
    325325AXSize: { 62.000000, 45.000000 }
     
    344344AXRole: AXTable
    345345AXParent: AXWebArea
    346 AXChildren: 6
     346AXChildren: 3
    347347AXPosition: { 8.000000, 333.000000 }
    348348AXSize: { 64.000000, 67.000000 }
     
    368368AXRole: AXTable
    369369AXParent: AXWebArea
    370 AXChildren: 6
     370AXChildren: 3
    371371AXPosition: { 8.000000, 333.000000 }
    372372AXSize: { 64.000000, 68.000000 }
     
    392392AXRole: AXTable
    393393AXParent: AXWebArea
    394 AXChildren: 4
     394AXChildren: 2
    395395AXPosition: { 8.000000, 333.000000 }
    396396AXSize: { 62.000000, 45.000000 }
  • trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy-expected.txt

    r176628 r176706  
    13134
    1414
    15 This tests the Atk table hierarhy.
     15End of test
     16This tests the accessible hierarchy for an HTML table.
    1617
    1718On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    1819
    1920
    20 PASS table1.role is 'AXRole: AXTable'
    21 PASS table1.rowCount is 1
    22 PASS table1.columnCount is 2
    23 PASS table2.role is 'AXRole: AXTable'
    24 PASS table2.rowCount is 3
    25 PASS table2.columnCount is 2
    26 PASS table3.role is 'AXRole: AXTable'
    27 PASS table3.rowCount is 1
    28 PASS table3.columnCount is 2
    29 PASS table4.role is 'AXRole: AXTable'
    30 PASS table4.rowCount is 3
    31 PASS table4.columnCount is 2
    32 PASS children is 2
    33 PASS table1.childAtIndex(i).role is 'AXRole: AXCell'
    34 PASS table1.childAtIndex(i).role is 'AXRole: AXCell'
    35 PASS children is 6
    36 PASS table2.childAtIndex(0).role is 'AXRole: AXColumnHeader'
    37 PASS table2.childAtIndex(1).role is 'AXRole: AXColumnHeader'
    38 PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
    39 PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
    40 PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
    41 PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
    42 PASS children is 2
    43 PASS table3.childAtIndex(i).role is 'AXRole: AXCell'
    44 PASS table3.childAtIndex(i).role is 'AXRole: AXCell'
    45 PASS children is 6
    46 PASS table4.childAtIndex(0).role is 'AXRole: AXColumnHeader'
    47 PASS table4.childAtIndex(1).role is 'AXRole: AXColumnHeader'
    48 PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
    49 PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
    50 PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
    51 PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
     21AXRole: AXWebArea
     22  AXRole: AXTable
     23    AXRole: AXRow
     24      AXRole: AXCell AXValue: foo
     25      AXRole: AXCell AXValue: bar
     26  AXRole: AXTable
     27    AXRole: AXRow
     28      AXRole: AXColumnHeader AXValue: Odd
     29      AXRole: AXColumnHeader AXValue: Even
     30    AXRole: AXRow
     31      AXRole: AXCell AXValue: 1
     32      AXRole: AXCell AXValue: 2
     33    AXRole: AXRow
     34      AXRole: AXCell AXValue: 3
     35      AXRole: AXCell AXValue: 4
     36  AXRole: AXTable
     37    AXRole: AXRow
     38      AXRole: AXCell AXValue: hello
     39      AXRole: AXCell AXValue: world
     40  AXRole: AXTable
     41    AXRole: AXRow
     42      AXRole: AXColumnHeader AXValue: Odd
     43      AXRole: AXColumnHeader AXValue: Even
     44    AXRole: AXRow
     45      AXRole: AXCell AXValue: 1<\n><\n>
     46        AXRole: AXParagraph AXValue: 1
     47      AXRole: AXCell AXValue: 2<\n><\n>
     48        AXRole: AXParagraph AXValue: 2
     49    AXRole: AXRow
     50      AXRole: AXCell AXValue: 3<\n><\n>
     51        AXRole: AXParagraph AXValue: 3
     52      AXRole: AXCell AXValue: 4<\n><\n>
     53        AXRole: AXParagraph AXValue: 4
    5254PASS successfullyParsed is true
    5355
  • trunk/LayoutTests/platform/gtk/accessibility/table-with-rules-expected.txt

    r158428 r176706  
    88AXRole: AXTable
    99AXParent: AXWebArea
    10 AXChildren: 2
     10AXChildren: 1
    1111AXPosition: { 8.000000, 27.000000 }
    1212AXSize: { 57.000000, 19.000000 }
     
    2626AXRole: AXTable
    2727AXParent: AXWebArea
    28 AXChildren: 2
     28AXChildren: 1
    2929AXPosition: { 8.000000, 46.000000 }
    3030AXSize: { 62.000000, 23.000000 }
     
    4444AXRole: AXTable
    4545AXParent: AXWebArea
    46 AXChildren: 2
     46AXChildren: 1
    4747AXPosition: { 8.000000, 69.000000 }
    4848AXSize: { 56.000000, 19.000000 }
     
    6262AXRole: AXTable
    6363AXParent: AXWebArea
    64 AXChildren: 2
     64AXChildren: 1
    6565AXPosition: { 8.000000, 88.000000 }
    6666AXSize: { 62.000000, 23.000000 }
  • trunk/LayoutTests/platform/gtk/accessibility/text-for-range-table-cells.html

    r160365 r176706  
    2020        document.getElementById("body").focus();
    2121        var webArea = accessibilityController.focusedElement;
    22         var table = webArea.childAtIndex(0);
    23         var cell1 = table.childAtIndex(0);
    24         var cell2 = table.childAtIndex(1);
    25         var cell3 = table.childAtIndex(2);
    26         var cell4 = table.childAtIndex(3);
     22        var row = webArea.childAtIndex(0).childAtIndex(0);
     23        var cell1 = row.childAtIndex(0);
     24        var cell2 = row.childAtIndex(1);
     25        var cell3 = row.childAtIndex(2);
     26        var cell4 = row.childAtIndex(3);
    2727        shouldBe("cell1.stringForRange(0, -1)", "'a table cell'");
    2828        shouldBe("cell2.stringForRange(0, -1)", "''");
  • trunk/Source/WebCore/ChangeLog

    r176698 r176706  
     12014-12-02  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] Table captions and table rows are missing from the accessible hierarchy
     4        https://bugs.webkit.org/show_bug.cgi?id=139005
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Expose table captions and rows via ATK. Accomplishing the former is done
     9        by role mapping and inclusion of the object as a child of the table for
     10        ATK. Accomplishing the latter was mostly a matter of deleting all the ATK
     11        platform code that had been forcing rows to be ignored. Because captions
     12        are not being exposed on the Mac, they are now explicitly being ignored
     13        for that platform.
     14
     15        Tests: accessibility/aria-table-hierarchy.html
     16               accessibility/table-hierarchy.html
     17
     18        * accessibility/AccessibilityObject.h:
     19        * accessibility/AccessibilityRenderObject.cpp:
     20        (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Added CaptionRole.
     21        * accessibility/AccessibilityTable.cpp:
     22        (WebCore::AccessibilityTable::addChildren): Include non-ignored captions as table children.
     23        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
     24        (webkitAccessibleGetNChildren): Removed special handling for tables.
     25        (webkitAccessibleRefChild): Removed special handling for tables.
     26        (webkitAccessibleGetIndexInParent): Removed special handling for table cells.
     27        (atkRole): Corrected broken mapping for RowRole.
     28        (getNChildrenForTable): Deleted.
     29        (getChildForTable): Deleted.
     30        (getIndexInParentForCellInRow): Deleted.
     31        * accessibility/mac/AccessibilityObjectMac.mm:
     32        (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore captions as table children.
     33
    1342014-12-02  Alexey Proskuryakov  <ap@apple.com>
    235
  • trunk/Source/WebCore/accessibility/AccessibilityObject.h

    r176552 r176706  
    108108    ButtonRole,
    109109    CanvasRole,
     110    CaptionRole,
    110111    CellRole,
    111112    CheckBoxRole,
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r176484 r176706  
    26192619        return BlockquoteRole;
    26202620
     2621    if (node && node->hasTagName(captionTag))
     2622        return CaptionRole;
     2623
    26212624#if ENABLE(VIDEO)
    26222625    if (is<HTMLVideoElement>(node))
  • trunk/Source/WebCore/accessibility/AccessibilityTable.cpp

    r175068 r176706  
    363363    table.recalcSectionsIfNeeded();
    364364   
     365    if (HTMLTableElement* tableElement = this->tableElement()) {
     366        if (HTMLTableCaptionElement* caption = tableElement->caption()) {
     367            AccessibilityObject& axCaption = *axObjectCache()->getOrCreate(caption);
     368            if (!axCaption.accessibilityIsIgnored())
     369                m_children.append(&axCaption);
     370        }
     371    }
     372
    365373    unsigned maxColumnCount = 0;
    366374    RenderTableSection* footer = table.footer();
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

    r176552 r176706  
    328328}
    329329
    330 static gint getNChildrenForTable(AccessibilityObject* coreObject)
    331 {
    332     const AccessibilityObject::AccessibilityChildrenVector& tableChildren = coreObject->children();
    333     size_t cellsCount = 0;
    334 
    335     // Look for the actual index of the cell inside the table.
    336     for (const auto& tableChild : tableChildren) {
    337         if (tableChild->isTableRow())
    338             cellsCount += tableChild->children().size();
    339         else
    340             cellsCount++;
    341     }
    342 
    343     return cellsCount;
    344 }
    345 
    346330static gint webkitAccessibleGetNChildren(AtkObject* object)
    347331{
     
    351335    AccessibilityObject* coreObject = core(object);
    352336
    353     // Tables should be treated in a different way because rows should
    354     // be bypassed when exposing the accessible hierarchy.
    355     if (is<AccessibilityTable>(*coreObject) && downcast<AccessibilityTable>(*coreObject).isExposableThroughAccessibility())
    356         return getNChildrenForTable(coreObject);
    357 
    358337    return coreObject->children().size();
    359 }
    360 
    361 static AccessibilityObject* getChildForTable(AccessibilityObject* coreObject, gint index)
    362 {
    363     const AccessibilityObject::AccessibilityChildrenVector& tableChildren = coreObject->children();
    364     size_t cellsCount = 0;
    365 
    366     // Look for the actual index of the cell inside the table.
    367     size_t current = static_cast<size_t>(index);
    368     for (const auto& tableChild : tableChildren) {
    369         if (tableChild->isTableRow()) {
    370             const AccessibilityObject::AccessibilityChildrenVector& rowChildren = tableChild->children();
    371             size_t rowChildrenCount = rowChildren.size();
    372             if (current < cellsCount + rowChildrenCount)
    373                 return rowChildren.at(current - cellsCount).get();
    374             cellsCount += rowChildrenCount;
    375         } else if (cellsCount == current)
    376             return tableChild.get();
    377         else
    378             cellsCount++;
    379     }
    380 
    381     // Shouldn't reach if the child was found.
    382     return 0;
    383338}
    384339
     
    394349    AccessibilityObject* coreChild = 0;
    395350
    396     // Tables are special cases because rows should be bypassed, but
    397     // still taking their cells into account.
    398     if (is<AccessibilityTable>(*coreObject) && downcast<AccessibilityTable>(*coreObject).isExposableThroughAccessibility())
    399         coreChild = getChildForTable(coreObject, index);
    400     else {
    401         const AccessibilityObject::AccessibilityChildrenVector& children = coreObject->children();
    402         if (static_cast<unsigned>(index) >= children.size())
    403             return 0;
    404         coreChild = children.at(index).get();
    405     }
     351    const AccessibilityObject::AccessibilityChildrenVector& children = coreObject->children();
     352    if (static_cast<size_t>(index) >= children.size())
     353        return 0;
     354    coreChild = children.at(index).get();
    406355
    407356    if (!coreChild)
     
    413362
    414363    return child;
    415 }
    416 
    417 static gint getIndexInParentForCellInRow(AccessibilityObject* coreObject)
    418 {
    419     AccessibilityObject* parent = coreObject->parentObjectUnignored();
    420     if (!parent)
    421         return -1;
    422 
    423     AccessibilityObject* grandParent = parent->parentObjectUnignored();
    424     if (!grandParent)
    425         return -1;
    426 
    427     const AccessibilityObject::AccessibilityChildrenVector& rows = grandParent->children();
    428     size_t previousCellsCount = 0;
    429 
    430     // Look for the actual index of the cell inside the table.
    431     for (const auto& row : rows) {
    432         if (!row->isTableRow())
    433             continue;
    434 
    435         const AccessibilityObject::AccessibilityChildrenVector& cells = row->children();
    436         size_t cellsCount = cells.size();
    437 
    438         if (row == parent) {
    439             for (unsigned j = 0; j < cellsCount; ++j) {
    440                 if (cells[j] == coreObject)
    441                     return previousCellsCount + j;
    442             }
    443         }
    444 
    445         previousCellsCount += cellsCount;
    446     }
    447 
    448     return -1;
    449364}
    450365
     
    471386        }
    472387    }
    473 
    474     // Need to calculate the index of the cell in the table, as
    475     // rows won't be exposed to assistive technologies.
    476     if (parent && parent->isTableRow() && coreObject->isTableCell())
    477         return getIndexInParentForCellInRow(coreObject);
    478388
    479389    if (!parent)
     
    631541        return ATK_ROLE_UNKNOWN; // Matches Mozilla
    632542    case RowRole:
    633         // return ATK_ROLE_TABLE_ROW_HEADER; // Is this right?
    634         return ATK_ROLE_LIST_ITEM; // Matches Mozilla
     543        return ATK_ROLE_TABLE_ROW;
    635544    case ToolbarRole:
    636545        return ATK_ROLE_TOOL_BAR;
     
    671580    case ColumnHeaderRole:
    672581        return ATK_ROLE_COLUMN_HEADER;
     582    case CaptionRole:
     583        return ATK_ROLE_CAPTION;
    673584    case CellRole:
    674585        return coreObject->inheritsPresentationalRole() ? ATK_ROLE_SECTION : ATK_ROLE_TABLE_CELL;
  • trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm

    r171477 r176706  
    7878        return IgnoreObject;
    7979
     80    if (roleValue() == CaptionRole)
     81        return IgnoreObject;
     82
    8083    // Never expose an unknown object on the Mac. Clients of the AX API will not know what to do with it.
    8184    // Special case is when the unknown object is actually an attachment.
  • trunk/Tools/ChangeLog

    r176698 r176706  
     12014-12-02  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] Table captions and table rows are missing from the accessible hierarchy
     4        https://bugs.webkit.org/show_bug.cgi?id=139005
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
     9        Add mapping for ATK_ROLE_CAPTION to roleToString
     10
    1112014-12-02  Alexey Proskuryakov  <ap@apple.com>
    212
  • trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

    r176556 r176706  
    340340    case ATK_ROLE_CANVAS:
    341341        return "AXCanvas";
     342    case ATK_ROLE_CAPTION:
     343        return "AXCaption";
    342344    case ATK_ROLE_CHECK_BOX:
    343345        return "AXCheckBox";
Note: See TracChangeset for help on using the changeset viewer.