Changeset 184754 in webkit


Ignore:
Timestamp:
May 21, 2015 11:12:05 PM (9 years ago)
Author:
jdiggs@igalia.com
Message:

AX: [GTK] Implement computedRoleString in AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=128420

Reviewed by Chris Fleizach.

Source/WebCore:

Expose all ARIA roles (not just landmark-related roles) via an "xml-roles" AtkObject
attribute as per http://www.w3.org/TR/core-aam-1.1/#roleMappingGeneralRules

Expose non-empty computed role strings via AtkObject attribute named "computed-role".
Currently the computed role and the ARIA role value happen to be the same string, but
that might not always be the case. And AtkObject attributes are cheap.

Test: platform/gtk/accessibility/xml-roles-exposed.html.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):

Tools:

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::computedRoleString): Implemented.

LayoutTests:

  • platform/gtk/TestExpectations: Removed roles-computedRoleString from the failing test.
  • platform/gtk/accessibility/image-link-expected.txt: Updated to reflect the new object attribute.
  • platform/gtk/accessibility/image-map2-expected.txt: Updated to reflect the new object attribute.
  • platform/gtk/accessibility/lists-expected.txt: Updated to reflect the new object attribute.
  • platform/gtk/accessibility/roles-computedRoleString-expected.txt: Added.
  • platform/gtk/accessibility/table-attributes-expected.txt: Updated to reflect the new object attribute.
  • platform/gtk/accessibility/table-cell-spans-expected.txt: Updated to reflect the new object attribute.
  • platform/gtk/accessibility/table-cells-expected.txt: Updated to reflect the new object attribute.
  • platform/gtk/accessibility/table-detection-expected.txt: Updated to reflect the new object attribute.
  • platform/gtk/accessibility/table-sections-expected.txt: Updated to reflect the new object attribute.
  • platform/gtk/accessibility/table-with-rules-expected.txt: Updated to reflect the new object attribute.
  • platform/gtk/accessibility/xml-roles-exposed-expected.txt: Added.
  • platform/gtk/accessibility/xml-roles-exposed.html: Added.
Location:
trunk
Files:
3 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r184749 r184754  
     12015-05-21  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [GTK] Implement computedRoleString in AccessibilityUIElement
     4        https://bugs.webkit.org/show_bug.cgi?id=128420
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * platform/gtk/TestExpectations: Removed roles-computedRoleString from the failing test.
     9        * platform/gtk/accessibility/image-link-expected.txt: Updated to reflect the new object attribute.
     10        * platform/gtk/accessibility/image-map2-expected.txt: Updated to reflect the new object attribute.
     11        * platform/gtk/accessibility/lists-expected.txt: Updated to reflect the new object attribute.
     12        * platform/gtk/accessibility/roles-computedRoleString-expected.txt: Added.
     13        * platform/gtk/accessibility/table-attributes-expected.txt: Updated to reflect the new object attribute.
     14        * platform/gtk/accessibility/table-cell-spans-expected.txt: Updated to reflect the new object attribute.
     15        * platform/gtk/accessibility/table-cells-expected.txt: Updated to reflect the new object attribute.
     16        * platform/gtk/accessibility/table-detection-expected.txt: Updated to reflect the new object attribute.
     17        * platform/gtk/accessibility/table-sections-expected.txt: Updated to reflect the new object attribute.
     18        * platform/gtk/accessibility/table-with-rules-expected.txt: Updated to reflect the new object attribute.
     19        * platform/gtk/accessibility/xml-roles-exposed-expected.txt: Added.
     20        * platform/gtk/accessibility/xml-roles-exposed.html: Added.
     21
    1222015-05-21  Antti Koivisto  <antti@apple.com>
    223
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r184721 r184754  
    18211821#webkit.org/b/85522 http/tests/security/sandboxed-iframe-form-top.html [ Skip ]
    18221822
    1823 webkit.org/b/128420 accessibility/roles-computedRoleString.html [ Skip ]
    1824 
    18251823webkit.org/b/103927 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html [ Failure ]
    18261824webkit.org/b/103927 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html [ Failure ]
  • trunk/LayoutTests/platform/gtk/accessibility/image-link-expected.txt

    r157859 r184754  
    2222AXChecked: 0
    2323AXURL: http://www.wowhead.com/?item=33924
    24 AXPlatformAttributes: html-id:test, toolkit:WebKitGtk
     24AXPlatformAttributes: computed-role:link, html-id:test, toolkit:WebKitGtk
    2525
    2626Child 0:
     
    4242AXChecked: 0
    4343AXURL: LayoutTests/accessibility/resources/cake.png
    44 AXPlatformAttributes: toolkit:WebKitGtk
     44AXPlatformAttributes: computed-role:img, toolkit:WebKitGtk
    4545
    4646
  • trunk/LayoutTests/platform/gtk/accessibility/image-map2-expected.txt

    r176505 r184754  
    3838AXChecked: 0
    3939AXURL: http://www.apple.com/
    40 AXPlatformAttributes: toolkit:WebKitGtk
     40AXPlatformAttributes: computed-role:link, toolkit:WebKitGtk
    4141------------
    4242AXRole: AXLink
     
    5858AXChecked: 0
    5959AXURL: http://www.apple.com/
    60 AXPlatformAttributes: toolkit:WebKitGtk
     60AXPlatformAttributes: computed-role:link, toolkit:WebKitGtk
    6161------------
    6262
  • trunk/LayoutTests/platform/gtk/accessibility/lists-expected.txt

    r167009 r184754  
    2828AXRequired: 0
    2929AXChecked: 0
    30 AXPlatformAttributes: toolkit:WebKitGtk
     30AXPlatformAttributes: computed-role:list, toolkit:WebKitGtk
    3131------------
    3232AXRole: AXList
     
    4646AXRequired: 0
    4747AXChecked: 0
    48 AXPlatformAttributes: toolkit:WebKitGtk
     48AXPlatformAttributes: computed-role:list, toolkit:WebKitGtk
    4949------------
    5050AXRole: AXDescriptionList
     
    8383AXRequired: 0
    8484AXChecked: 0
    85 AXPlatformAttributes: toolkit:WebKitGtk
     85AXPlatformAttributes: computed-role:group, toolkit:WebKitGtk
    8686------------
    8787
     
    104104AXRequired: 0
    105105AXChecked: 0
    106 AXPlatformAttributes: toolkit:WebKitGtk
     106AXPlatformAttributes: computed-role:listitem, toolkit:WebKitGtk
    107107------------
    108108AXRole: AXListItem
     
    123123AXRequired: 0
    124124AXChecked: 0
    125 AXPlatformAttributes: toolkit:WebKitGtk
     125AXPlatformAttributes: computed-role:listitem, toolkit:WebKitGtk
    126126------------
    127127
     
    144144AXRequired: 0
    145145AXChecked: 0
    146 AXPlatformAttributes: toolkit:WebKitGtk
     146AXPlatformAttributes: computed-role:listitem, toolkit:WebKitGtk
    147147------------
    148148AXRole: AXListItem
     
    163163AXRequired: 0
    164164AXChecked: 0
    165 AXPlatformAttributes: toolkit:WebKitGtk
     165AXPlatformAttributes: computed-role:listitem, toolkit:WebKitGtk
    166166------------
    167167
  • trunk/LayoutTests/platform/gtk/accessibility/table-attributes-expected.txt

    r184135 r184754  
    2626AXRequired: 0
    2727AXChecked: 0
    28 AXPlatformAttributes: toolkit:WebKitGtk
     28AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    2929------------
    3030AXRole: AXColumnHeader
     
    4545AXRequired: 0
    4646AXChecked: 0
    47 AXPlatformAttributes: toolkit:WebKitGtk
     47AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    4848------------
    4949AXRole: AXColumnHeader
     
    6464AXRequired: 0
    6565AXChecked: 0
    66 AXPlatformAttributes: toolkit:WebKitGtk
     66AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    6767------------
    6868AXRole: AXColumnHeader
     
    8383AXRequired: 0
    8484AXChecked: 0
    85 AXPlatformAttributes: toolkit:WebKitGtk
     85AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    8686------------
    8787AXRole: AXColumnHeader
     
    102102AXRequired: 0
    103103AXChecked: 0
    104 AXPlatformAttributes: toolkit:WebKitGtk
     104AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    105105------------
    106106
     
    125125AXRequired: 0
    126126AXChecked: 0
    127 AXPlatformAttributes: toolkit:WebKitGtk
     127AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    128128------------
    129129AXRole: AXColumnHeader
     
    144144AXRequired: 0
    145145AXChecked: 0
    146 AXPlatformAttributes: toolkit:WebKitGtk
     146AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    147147------------
    148148AXRole: AXRowHeader
     
    163163AXRequired: 0
    164164AXChecked: 0
    165 AXPlatformAttributes: toolkit:WebKitGtk
     165AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    166166------------
    167167AXRole: AXRowHeader
     
    182182AXRequired: 0
    183183AXChecked: 0
    184 AXPlatformAttributes: toolkit:WebKitGtk
     184AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    185185------------
    186186
     
    213213AXRequired: 0
    214214AXChecked: 0
    215 AXPlatformAttributes: toolkit:WebKitGtk
     215AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    216216------------
    217217AXRole: AXColumnHeader
     
    232232AXRequired: 0
    233233AXChecked: 0
    234 AXPlatformAttributes: toolkit:WebKitGtk
     234AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    235235------------
    236236AXRole: AXColumnHeader
     
    251251AXRequired: 0
    252252AXChecked: 0
    253 AXPlatformAttributes: toolkit:WebKitGtk
     253AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    254254------------
    255255AXRole: AXColumnHeader
     
    270270AXRequired: 0
    271271AXChecked: 0
    272 AXPlatformAttributes: toolkit:WebKitGtk
     272AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    273273------------
    274274AXRole: AXColumnHeader
     
    289289AXRequired: 0
    290290AXChecked: 0
    291 AXPlatformAttributes: toolkit:WebKitGtk
     291AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    292292------------
    293293AXRole: AXColumnHeader
     
    308308AXRequired: 0
    309309AXChecked: 0
    310 AXPlatformAttributes: toolkit:WebKitGtk
     310AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    311311------------
    312312AXRole: AXColumnHeader
     
    327327AXRequired: 0
    328328AXChecked: 0
    329 AXPlatformAttributes: toolkit:WebKitGtk
     329AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    330330------------
    331331AXRole: AXColumnHeader
     
    346346AXRequired: 0
    347347AXChecked: 0
    348 AXPlatformAttributes: toolkit:WebKitGtk
     348AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    349349------------
    350350AXRole: AXCell
     
    365365AXRequired: 0
    366366AXChecked: 0
    367 AXPlatformAttributes: toolkit:WebKitGtk
     367AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    368368------------
    369369AXRole: AXCell
     
    384384AXRequired: 0
    385385AXChecked: 0
    386 AXPlatformAttributes: toolkit:WebKitGtk
     386AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    387387------------
    388388AXRole: AXRowHeader
     
    403403AXRequired: 0
    404404AXChecked: 0
    405 AXPlatformAttributes: toolkit:WebKitGtk
     405AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    406406------------
    407407AXRole: AXCell
     
    422422AXRequired: 0
    423423AXChecked: 0
    424 AXPlatformAttributes: toolkit:WebKitGtk
     424AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    425425------------
    426426AXRole: AXCell
     
    441441AXRequired: 0
    442442AXChecked: 0
    443 AXPlatformAttributes: toolkit:WebKitGtk
     443AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    444444------------
    445445AXRole: AXCell
     
    460460AXRequired: 0
    461461AXChecked: 0
    462 AXPlatformAttributes: toolkit:WebKitGtk
     462AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    463463------------
    464464AXRole: AXCell
     
    479479AXRequired: 0
    480480AXChecked: 0
    481 AXPlatformAttributes: toolkit:WebKitGtk
     481AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    482482------------
    483483AXRole: AXRowHeader
     
    498498AXRequired: 0
    499499AXChecked: 0
    500 AXPlatformAttributes: toolkit:WebKitGtk
     500AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    501501------------
    502502AXRole: AXCell
     
    517517AXRequired: 0
    518518AXChecked: 0
    519 AXPlatformAttributes: toolkit:WebKitGtk
     519AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    520520------------
    521521AXRole: AXCell
     
    536536AXRequired: 0
    537537AXChecked: 0
    538 AXPlatformAttributes: toolkit:WebKitGtk
     538AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    539539------------
    540540AXRole: AXCell
     
    555555AXRequired: 0
    556556AXChecked: 0
    557 AXPlatformAttributes: toolkit:WebKitGtk
     557AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    558558------------
    559559AXRole: AXCell
     
    574574AXRequired: 0
    575575AXChecked: 0
    576 AXPlatformAttributes: toolkit:WebKitGtk
    577 ------------
    578 
    579 
    580 --------------------------
    581 
    582 
    583 
    584 --------------------------
    585 
    586 
     576AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
     577------------
     578
     579
     580--------------------------
     581
     582
     583
     584--------------------------
     585
     586
  • trunk/LayoutTests/platform/gtk/accessibility/table-cell-spans-expected.txt

    r184135 r184754  
    2626AXRequired: 0
    2727AXChecked: 0
    28 AXPlatformAttributes: toolkit:WebKitGtk
     28AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    2929{0, 2}, {0, 2}
    3030
     
    4848AXRequired: 0
    4949AXChecked: 0
    50 AXPlatformAttributes: toolkit:WebKitGtk
     50AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    5151{0, 2}, {0, 2}
    5252
     
    7070AXRequired: 0
    7171AXChecked: 0
    72 AXPlatformAttributes: toolkit:WebKitGtk
     72AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    7373{2, 2}, {0, 1}
    7474
     
    9292AXRequired: 0
    9393AXChecked: 0
    94 AXPlatformAttributes: toolkit:WebKitGtk
     94AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    9595{2, 2}, {0, 1}
    9696
     
    114114AXRequired: 0
    115115AXChecked: 0
    116 AXPlatformAttributes: toolkit:WebKitGtk
     116AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    117117{2, 1}, {3, 1}
    118118
  • trunk/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt

    r184135 r184754  
    2828AXRequired: 0
    2929AXChecked: 0
    30 AXPlatformAttributes: toolkit:WebKitGtk
     30AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    3131------------------------
    3232[3,1]
     
    4848AXRequired: 0
    4949AXChecked: 0
    50 AXPlatformAttributes: toolkit:WebKitGtk
     50AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    5151------------------------
    5252[1,1]
     
    6868AXRequired: 0
    6969AXChecked: 0
    70 AXPlatformAttributes: toolkit:WebKitGtk
     70AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    7171------------------------
    7272[2,2]
     
    8888AXRequired: 0
    8989AXChecked: 0
    90 AXPlatformAttributes: toolkit:WebKitGtk
     90AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    9191------------------------
    9292[3,5]
     
    108108AXRequired: 0
    109109AXChecked: 0
    110 AXPlatformAttributes: toolkit:WebKitGtk
     110AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    111111------------------------
    112112[100,0]
  • trunk/LayoutTests/platform/gtk/accessibility/table-detection-expected.txt

    r184199 r184754  
    1818AXRequired: 0
    1919AXChecked: 0
    20 AXPlatformAttributes: toolkit:WebKitGtk
     20AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    2121
    2222asdf    asdf
     
    4141AXRequired: 0
    4242AXChecked: 0
    43 AXPlatformAttributes: toolkit:WebKitGtk
     43AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    4444
    4545asdf    asdf
     
    8686AXRequired: 0
    8787AXChecked: 0
    88 AXPlatformAttributes: toolkit:WebKitGtk
     88AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    8989
    9090asdf    asdf
     
    108108AXRequired: 0
    109109AXChecked: 0
    110 AXPlatformAttributes: toolkit:WebKitGtk
     110AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    111111
    112112asdf    asdf
     
    130130AXRequired: 0
    131131AXChecked: 0
    132 AXPlatformAttributes: toolkit:WebKitGtk
     132AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    133133
    134134asdf    asdf
     
    153153AXRequired: 0
    154154AXChecked: 0
    155 AXPlatformAttributes: toolkit:WebKitGtk
     155AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    156156
    157157asdf    asdf
     
    221221AXRequired: 0
    222222AXChecked: 0
    223 AXPlatformAttributes: toolkit:WebKitGtk
     223AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    224224
    225225asdf    asdf
     
    295295AXRequired: 0
    296296AXChecked: 0
    297 AXPlatformAttributes: toolkit:WebKitGtk
     297AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    298298
    299299asdf    asdf
     
    317317AXRequired: 0
    318318AXChecked: 0
    319 AXPlatformAttributes: toolkit:WebKitGtk
     319AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    320320
    321321asdf    asdf
     
    364364AXRequired: 0
    365365AXChecked: 0
    366 AXPlatformAttributes: toolkit:WebKitGtk
     366AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    367367
    368368asdf    asdf
     
    388388AXRequired: 0
    389389AXChecked: 0
    390 AXPlatformAttributes: toolkit:WebKitGtk
     390AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    391391
    392392asdf    asdf
     
    412412AXRequired: 0
    413413AXChecked: 0
    414 AXPlatformAttributes: toolkit:WebKitGtk
     414AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    415415
    416416asdf    asdf
     
    435435AXRequired: 0
    436436AXChecked: 0
    437 AXPlatformAttributes: toolkit:WebKitGtk
     437AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    438438
    439439asdf
     
    480480AXRequired: 0
    481481AXChecked: 0
    482 AXPlatformAttributes: toolkit:WebKitGtk
     482AXPlatformAttributes: computed-role:grid, toolkit:WebKitGtk
    483483
    484484head    head2
  • trunk/LayoutTests/platform/gtk/accessibility/table-sections-expected.txt

    r184135 r184754  
    3535AXRequired: 0
    3636AXChecked: 0
    37 AXPlatformAttributes: toolkit:WebKitGtk
     37AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    3838------------
    3939AXRole: AXColumnHeader
     
    5454AXRequired: 0
    5555AXChecked: 0
    56 AXPlatformAttributes: toolkit:WebKitGtk
     56AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    5757------------
    5858AXRole: AXCell
     
    7373AXRequired: 0
    7474AXChecked: 0
    75 AXPlatformAttributes: toolkit:WebKitGtk
     75AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    7676------------
    7777
     
    9696AXRequired: 0
    9797AXChecked: 0
    98 AXPlatformAttributes: toolkit:WebKitGtk
     98AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    9999------------
    100100AXRole: AXRowHeader
     
    115115AXRequired: 0
    116116AXChecked: 0
    117 AXPlatformAttributes: toolkit:WebKitGtk
     117AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    118118------------
    119119AXRole: AXRowHeader
     
    134134AXRequired: 0
    135135AXChecked: 0
    136 AXPlatformAttributes: toolkit:WebKitGtk
     136AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    137137------------
    138138
     
    181181AXRequired: 0
    182182AXChecked: 0
    183 AXPlatformAttributes: toolkit:WebKitGtk
     183AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    184184------------
    185185AXRole: AXColumnHeader
     
    200200AXRequired: 0
    201201AXChecked: 0
    202 AXPlatformAttributes: toolkit:WebKitGtk
     202AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    203203------------
    204204AXRole: AXCell
     
    219219AXRequired: 0
    220220AXChecked: 0
    221 AXPlatformAttributes: toolkit:WebKitGtk
     221AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    222222------------
    223223AXRole: AXRowHeader
     
    238238AXRequired: 0
    239239AXChecked: 0
    240 AXPlatformAttributes: toolkit:WebKitGtk
     240AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    241241------------
    242242AXRole: AXCell
     
    257257AXRequired: 0
    258258AXChecked: 0
    259 AXPlatformAttributes: toolkit:WebKitGtk
     259AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    260260------------
    261261AXRole: AXCell
     
    276276AXRequired: 0
    277277AXChecked: 0
    278 AXPlatformAttributes: toolkit:WebKitGtk
     278AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    279279------------
    280280AXRole: AXRowHeader
     
    295295AXRequired: 0
    296296AXChecked: 0
    297 AXPlatformAttributes: toolkit:WebKitGtk
     297AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    298298------------
    299299AXRole: AXCell
     
    314314AXRequired: 0
    315315AXChecked: 0
    316 AXPlatformAttributes: toolkit:WebKitGtk
     316AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    317317------------
    318318AXRole: AXCell
     
    333333AXRequired: 0
    334334AXChecked: 0
    335 AXPlatformAttributes: toolkit:WebKitGtk
     335AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    336336------------
    337337AXRole: AXCell
     
    352352AXRequired: 0
    353353AXChecked: 0
    354 AXPlatformAttributes: toolkit:WebKitGtk
     354AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    355355------------
    356356AXRole: AXCell
     
    371371AXRequired: 0
    372372AXChecked: 0
    373 AXPlatformAttributes: toolkit:WebKitGtk
     373AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    374374------------
    375375AXRole: AXCell
     
    390390AXRequired: 0
    391391AXChecked: 0
    392 AXPlatformAttributes: toolkit:WebKitGtk
     392AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    393393------------
    394394
     
    421421AXRequired: 0
    422422AXChecked: 0
    423 AXPlatformAttributes: toolkit:WebKitGtk
     423AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    424424------------
    425425AXRole: AXColumnHeader
     
    440440AXRequired: 0
    441441AXChecked: 0
    442 AXPlatformAttributes: toolkit:WebKitGtk
     442AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    443443------------
    444444AXRole: AXCell
     
    459459AXRequired: 0
    460460AXChecked: 0
    461 AXPlatformAttributes: toolkit:WebKitGtk
     461AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    462462------------
    463463
     
    482482AXRequired: 0
    483483AXChecked: 0
    484 AXPlatformAttributes: toolkit:WebKitGtk
     484AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    485485------------
    486486AXRole: AXRowHeader
     
    501501AXRequired: 0
    502502AXChecked: 0
    503 AXPlatformAttributes: toolkit:WebKitGtk
     503AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    504504------------
    505505AXRole: AXRowHeader
     
    520520AXRequired: 0
    521521AXChecked: 0
    522 AXPlatformAttributes: toolkit:WebKitGtk
     522AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    523523------------
    524524
     
    567567AXRequired: 0
    568568AXChecked: 0
    569 AXPlatformAttributes: toolkit:WebKitGtk
     569AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    570570------------
    571571AXRole: AXColumnHeader
     
    586586AXRequired: 0
    587587AXChecked: 0
    588 AXPlatformAttributes: toolkit:WebKitGtk
     588AXPlatformAttributes: computed-role:columnheader, toolkit:WebKitGtk
    589589------------
    590590AXRole: AXCell
     
    605605AXRequired: 0
    606606AXChecked: 0
    607 AXPlatformAttributes: toolkit:WebKitGtk
     607AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    608608------------
    609609AXRole: AXRowHeader
     
    624624AXRequired: 0
    625625AXChecked: 0
    626 AXPlatformAttributes: toolkit:WebKitGtk
     626AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    627627------------
    628628AXRole: AXCell
     
    643643AXRequired: 0
    644644AXChecked: 0
    645 AXPlatformAttributes: toolkit:WebKitGtk
     645AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    646646------------
    647647AXRole: AXCell
     
    662662AXRequired: 0
    663663AXChecked: 0
    664 AXPlatformAttributes: toolkit:WebKitGtk
     664AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    665665------------
    666666AXRole: AXRowHeader
     
    681681AXRequired: 0
    682682AXChecked: 0
    683 AXPlatformAttributes: toolkit:WebKitGtk
     683AXPlatformAttributes: computed-role:rowheader, toolkit:WebKitGtk
    684684------------
    685685AXRole: AXCell
     
    700700AXRequired: 0
    701701AXChecked: 0
    702 AXPlatformAttributes: toolkit:WebKitGtk
     702AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    703703------------
    704704AXRole: AXCell
     
    719719AXRequired: 0
    720720AXChecked: 0
    721 AXPlatformAttributes: toolkit:WebKitGtk
     721AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    722722------------
    723723AXRole: AXCell
     
    738738AXRequired: 0
    739739AXChecked: 0
    740 AXPlatformAttributes: toolkit:WebKitGtk
     740AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    741741------------
    742742AXRole: AXCell
     
    757757AXRequired: 0
    758758AXChecked: 0
    759 AXPlatformAttributes: toolkit:WebKitGtk
     759AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
    760760------------
    761761AXRole: AXCell
     
    776776AXRequired: 0
    777777AXChecked: 0
    778 AXPlatformAttributes: toolkit:WebKitGtk
    779 ------------
    780 
    781 
    782 --------------------------
    783 
    784 
    785 
    786 --------------------------
    787 
    788 
     778AXPlatformAttributes: computed-role:gridcell, toolkit:WebKitGtk
     779------------
     780
     781
     782--------------------------
     783
     784
     785
     786--------------------------
     787
     788
  • trunk/LayoutTests/platform/gtk/accessibility/table-with-rules-expected.txt

    r184199 r184754  
    2222AXRequired: 0
    2323AXChecked: 0
    24 AXPlatformAttributes: html-id:testTable2, toolkit:WebKitGtk
     24AXPlatformAttributes: computed-role:grid, html-id:testTable2, toolkit:WebKitGtk
    2525
    2626AXRole: AXTable
     
    4040AXRequired: 0
    4141AXChecked: 0
    42 AXPlatformAttributes: html-id:testTable3, toolkit:WebKitGtk
     42AXPlatformAttributes: computed-role:grid, html-id:testTable3, toolkit:WebKitGtk
    4343
    4444AXRole: AXTable
     
    5858AXRequired: 0
    5959AXChecked: 0
    60 AXPlatformAttributes: html-id:testTable4, toolkit:WebKitGtk
     60AXPlatformAttributes: computed-role:grid, html-id:testTable4, toolkit:WebKitGtk
    6161
    6262AXRole: AXSection
  • trunk/Source/WebCore/ChangeLog

    r184749 r184754  
     12015-05-21  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [GTK] Implement computedRoleString in AccessibilityUIElement
     4        https://bugs.webkit.org/show_bug.cgi?id=128420
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Expose all ARIA roles (not just landmark-related roles) via an "xml-roles" AtkObject
     9        attribute as per http://www.w3.org/TR/core-aam-1.1/#roleMappingGeneralRules
     10
     11        Expose non-empty computed role strings via AtkObject attribute named "computed-role".
     12        Currently the computed role and the ARIA role value happen to be the same string, but
     13        that might not always be the case. And AtkObject attributes are cheap.
     14
     15        Test: platform/gtk/accessibility/xml-roles-exposed.html.
     16
     17        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
     18        (webkitAccessibleGetAttributes):
     19
    1202015-05-21  Antti Koivisto  <antti@apple.com>
    221
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

    r184135 r184754  
    452452        attributeSet = addToAtkAttributeSet(attributeSet, "setsize", String::number(coreObject->ariaSetSize()).utf8().data());
    453453
    454     // Landmarks will be exposed with xml-roles object attributes, with the exception
    455     // of LandmarkApplicationRole, which will be exposed with ATK_ROLE_EMBEDDED.
    456     AccessibilityRole role = coreObject->roleValue();
    457     switch (role) {
    458     case LandmarkBannerRole:
    459         attributeSet = addToAtkAttributeSet(attributeSet, "xml-roles", "banner");
    460         break;
    461     case LandmarkComplementaryRole:
    462         attributeSet = addToAtkAttributeSet(attributeSet, "xml-roles", "complementary");
    463         break;
    464     case LandmarkContentInfoRole:
    465         attributeSet = addToAtkAttributeSet(attributeSet, "xml-roles", "contentinfo");
    466         break;
    467     case LandmarkMainRole:
    468         attributeSet = addToAtkAttributeSet(attributeSet, "xml-roles", "main");
    469         break;
    470     case LandmarkNavigationRole:
    471         attributeSet = addToAtkAttributeSet(attributeSet, "xml-roles", "navigation");
    472         break;
    473     case LandmarkSearchRole:
    474         attributeSet = addToAtkAttributeSet(attributeSet, "xml-roles", "search");
    475         break;
    476     default:
    477         break;
     454    // According to the W3C Core Accessibility API Mappings 1.1, section 5.4.1 General Rules:
     455    // "User agents must expose the WAI-ARIA role string if the API supports a mechanism to do so."
     456    // In the case of ATK, the mechanism to do so is an object attribute pair (xml-roles:"string").
     457    // The computedRoleString is primarily for testing, and not limited to elements with ARIA roles.
     458    // Because the computedRoleString currently contains the ARIA role string, we'll use it for
     459    // both purposes, as the "computed-role" object attribute for all elements which have a value
     460    // and also via the "xml-roles" attribute for elements with ARIA, as well as for landmarks.
     461    String roleString = coreObject->computedRoleString();
     462    if (!roleString.isEmpty()) {
     463        if (coreObject->ariaRoleAttribute() != UnknownRole || coreObject->isLandmark())
     464            attributeSet = addToAtkAttributeSet(attributeSet, "xml-roles", roleString.utf8().data());
     465        attributeSet = addToAtkAttributeSet(attributeSet, "computed-role", roleString.utf8().data());
    478466    }
    479467
  • trunk/Tools/ChangeLog

    r184712 r184754  
     12015-05-21  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [GTK] Implement computedRoleString in AccessibilityUIElement
     4        https://bugs.webkit.org/show_bug.cgi?id=128420
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
     9        (WTR::AccessibilityUIElement::computedRoleString): Implemented.
     10
    1112015-05-21  Csaba Osztrogonác  <ossy@webkit.org>
    212
  • trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

    r184198 r184754  
    10711071JSRetainPtr<JSStringRef> AccessibilityUIElement::computedRoleString()
    10721072{
    1073     // FIXME: implement http://webkit.org/b/128420
     1073    String role = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), ObjectAttributeType, "computed-role");
     1074    if (!role.isEmpty())
     1075        return JSStringCreateWithUTF8CString(role.utf8().data());
     1076
    10741077    return JSStringCreateWithCharacters(0, 0);
    10751078}
Note: See TracChangeset for help on using the changeset viewer.