- a/LayoutTests/ChangeLog +13 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2
3
        Unreviewed, rolling out r82295 and r82300.
4
        http://trac.webkit.org/changeset/82295
5
        http://trac.webkit.org/changeset/82300
6
        https://bugs.webkit.org/show_bug.cgi?id=57380
7
8
        This patch breaks compile on Chromium (Requested by
9
        abarth|gardener on #webkit).
10
11
        * platform/gtk/accessibility/aria-roles-unignored-expected.txt: Removed.
12
        * platform/gtk/accessibility/aria-roles-unignored.html: Removed.
13
1
2011-03-29  David Hyatt  <hyatt@apple.com>
14
2011-03-29  David Hyatt  <hyatt@apple.com>
2
15
3
        Reviewed by Simon Fraser.
16
        Reviewed by Simon Fraser.
- a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt -26 lines
Lines 1-26 a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt_sec1
1
Simple paragraph
2
3
A paragraph pretending to be a table
4
5
A label Who said label? It's a heading!
6
A form with a button Click me!
7
Just a button Click me!
8
Just some text inside a div
9
This div is contains a textbox (an entry)
10
This tests that ARIA roles are not ignored for 'p','label', 'form' and 'div' elements
11
12
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
13
14
15
PASS element.role is 'AXRole: paragraph'
16
PASS element.role is 'AXRole: table'
17
PASS element.role is 'AXRole: label'
18
PASS element.role is 'AXRole: heading'
19
PASS element.role is 'AXRole: form'
20
PASS element.role is 'AXRole: push button'
21
PASS element.role is 'AXRole: panel'
22
PASS element.role is 'AXRole: entry'
23
PASS successfullyParsed is true
24
25
TEST COMPLETE
26
- a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html -67 lines
Lines 1-67 a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html_sec1
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
<head>
4
<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
5
<script>
6
var successfullyParsed = false;
7
</script>
8
<script src="../../../fast/js/resources/js-test-pre.js"></script>
9
</head>
10
<body id="body">
11
12
<p>Simple paragraph</p>
13
<p role="grid">A paragraph pretending to be a table</p>
14
15
<label>A label</label>
16
<label role="heading">Who said label? It's a heading!</label>
17
18
<form>A form with a button <button name="button" value="Button">Click me!</button></form>
19
<form role="button">Just a button <button name="button" value="Button">Click me!</button></form>
20
21
<div>Just some text inside a div</form>
22
<div role="textbox">This div is contains a textbox (an entry)</div>
23
24
<p id="description"></p>
25
<div id="console"></div>
26
<script>
27
description("This tests that ARIA roles are not ignored for 'p','label', 'form' and 'div' elements");
28
29
if (window.layoutController) {
30
    layoutTestController.dumpAsText();
31
}
32
33
if (window.accessibilityController) {
34
    document.getElementById("body").focus();
35
    var webArea = accessibilityController.focusedElement;
36
37
    // Paragraphs
38
    var element = webArea.childAtIndex(0);
39
    shouldBe("element.role", "'AXRole: paragraph'");
40
    element = webArea.childAtIndex(1);
41
    shouldBe("element.role", "'AXRole: table'");
42
43
    // Labels are exposed as inside a panel
44
    var labelsPanel = webArea.childAtIndex(2);
45
    element = labelsPanel.childAtIndex(0);
46
    shouldBe("element.role", "'AXRole: label'");
47
    element = labelsPanel.childAtIndex(1);
48
    shouldBe("element.role", "'AXRole: heading'");
49
50
    // Forms
51
    element = webArea.childAtIndex(3);
52
    shouldBe("element.role", "'AXRole: form'");
53
    element = webArea.childAtIndex(4);
54
    shouldBe("element.role", "'AXRole: push button'");
55
56
    // Divs
57
    element = webArea.childAtIndex(5);
58
    shouldBe("element.role", "'AXRole: panel'");
59
    element = webArea.childAtIndex(6);
60
    shouldBe("element.role", "'AXRole: entry'");
61
}
62
63
successfullyParsed = true;
64
</script>
65
<script src="../../../fast/js/resources/js-test-post.js"></script>
66
</body>
67
</html>
- a/Source/WebCore/ChangeLog +18 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2
3
        Unreviewed, rolling out r82295 and r82300.
4
        http://trac.webkit.org/changeset/82295
5
        http://trac.webkit.org/changeset/82300
6
        https://bugs.webkit.org/show_bug.cgi?id=57380
7
8
        This patch breaks compile on Chromium (Requested by
9
        abarth|gardener on #webkit).
10
11
        * accessibility/AccessibilityObject.h:
12
        * accessibility/AccessibilityRenderObject.cpp:
13
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
14
        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
15
        (atkRole):
16
        (webkit_accessible_get_role):
17
        * accessibility/mac/AccessibilityObjectWrapper.mm:
18
1
2011-03-29  Anders Carlsson  <andersca@apple.com>
19
2011-03-29  Anders Carlsson  <andersca@apple.com>
2
20
3
        Fix clang build.
21
        Fix clang build.
- a/Source/WebCore/accessibility/AccessibilityObject.h -4 lines
Lines 171-180 enum AccessibilityRole { a/Source/WebCore/accessibility/AccessibilityObject.h_sec1
171
    ListItemRole,
171
    ListItemRole,
172
    MenuListPopupRole,
172
    MenuListPopupRole,
173
    MenuListOptionRole,
173
    MenuListOptionRole,
174
    ParagraphRole,
175
    LabelRole,
176
    DivRole,
177
    FormRole,
178
174
179
    // ARIA Grouping roles
175
    // ARIA Grouping roles
180
    LandmarkApplicationRole,
176
    LandmarkApplicationRole,
- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp -13 / +1 lines
Lines 3089-3107 AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole() a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp_sec1
3089
        return SplitterRole;
3089
        return SplitterRole;
3090
#endif
3090
#endif
3091
3091
3092
    if (node && node->hasTagName(pTag))
3092
    if (m_renderer->isBlockFlow() || (node && node->hasTagName(labelTag)))
3093
        return ParagraphRole;
3094
3095
    if (node && node->hasTagName(labelTag))
3096
        return LabelRole;
3097
3098
    if (node && node->hasTagName(divTag))
3099
        return DivRole;
3100
3101
    if (node && node->hasTagName(formTag))
3102
        return FormRole;
3103
3104
    if (m_renderer->isBlockFlow())
3105
        return GroupRole;
3093
        return GroupRole;
3106
    
3094
    
3107
    // If the element does not have role, but it has ARIA attributes, accessibility should fallback to exposing it as a group.
3095
    // If the element does not have role, but it has ARIA attributes, accessibility should fallback to exposing it as a group.
- a/Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp -12 / +19 lines
Lines 476-489 static AtkRole atkRole(AccessibilityRole role) a/Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp_sec1
476
    case ListItemRole:
476
    case ListItemRole:
477
    case ListBoxOptionRole:
477
    case ListBoxOptionRole:
478
        return ATK_ROLE_LIST_ITEM;
478
        return ATK_ROLE_LIST_ITEM;
479
    case ParagraphRole:
480
        return ATK_ROLE_PARAGRAPH;
481
    case LabelRole:
482
        return ATK_ROLE_LABEL;
483
    case DivRole:
484
        return ATK_ROLE_SECTION;
485
    case FormRole:
486
        return ATK_ROLE_FORM;
487
    default:
479
    default:
488
        return ATK_ROLE_UNKNOWN;
480
        return ATK_ROLE_UNKNOWN;
489
    }
481
    }
Lines 491-506 static AtkRole atkRole(AccessibilityRole role) a/Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp_sec2
491
483
492
static AtkRole webkit_accessible_get_role(AtkObject* object)
484
static AtkRole webkit_accessible_get_role(AtkObject* object)
493
{
485
{
494
    AccessibilityObject* coreObject = core(object);
486
    AccessibilityObject* axObject = core(object);
495
487
496
    if (!coreObject)
488
    if (!axObject)
497
        return ATK_ROLE_UNKNOWN;
489
        return ATK_ROLE_UNKNOWN;
498
490
491
    // WebCore does not know about paragraph role, label role, or section role
492
    if (axObject->isAccessibilityRenderObject()) {
493
        Node* node = static_cast<AccessibilityRenderObject*>(axObject)->renderer()->node();
494
        if (node) {
495
            if (node->hasTagName(HTMLNames::pTag))
496
                return ATK_ROLE_PARAGRAPH;
497
            if (node->hasTagName(HTMLNames::labelTag))
498
                return ATK_ROLE_LABEL;
499
            if (node->hasTagName(HTMLNames::divTag))
500
                return ATK_ROLE_SECTION;
501
            if (node->hasTagName(HTMLNames::formTag))
502
                return ATK_ROLE_FORM;
503
        }
504
    }
505
499
    // Note: Why doesn't WebCore have a password field for this
506
    // Note: Why doesn't WebCore have a password field for this
500
    if (coreObject->isPasswordField())
507
    if (axObject->isPasswordField())
501
        return ATK_ROLE_PASSWORD_TEXT;
508
        return ATK_ROLE_PASSWORD_TEXT;
502
509
503
    return atkRole(coreObject->roleValue());
510
    return atkRole(axObject->roleValue());
504
}
511
}
505
512
506
static bool selectionBelongsToObject(AccessibilityObject* coreObject, VisibleSelection& selection)
513
static bool selectionBelongsToObject(AccessibilityObject* coreObject, VisibleSelection& selection)
- a/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm -5 / +1 lines
Lines 1287-1297 static const AccessibilityRoleMap& createAccessibilityRoleMap() a/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm_sec1
1287
        { TabPanelRole, NSAccessibilityGroupRole },
1287
        { TabPanelRole, NSAccessibilityGroupRole },
1288
        { TreeRole, NSAccessibilityOutlineRole },
1288
        { TreeRole, NSAccessibilityOutlineRole },
1289
        { TreeItemRole, NSAccessibilityRowRole },
1289
        { TreeItemRole, NSAccessibilityRowRole },
1290
        { ListItemRole, NSAccessibilityGroupRole },
1290
        { ListItemRole, NSAccessibilityGroupRole }
1291
        { ParagraphRole, NSAccessibilityGroupRole },
1292
        { LabelRole, NSAccessibilityGroupRole },
1293
        { DivRole, NSAccessibilityGroupRole },
1294
        { FormRole, NSAccessibilityGroupRole }
1295
    };
1291
    };
1296
    AccessibilityRoleMap& roleMap = *new AccessibilityRoleMap;
1292
    AccessibilityRoleMap& roleMap = *new AccessibilityRoleMap;
1297
    
1293
    
- a/Source/WebKit/chromium/ChangeLog +13 lines
Lines 1-3 a/Source/WebKit/chromium/ChangeLog_sec1
1
2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2
3
        Unreviewed, rolling out r82295 and r82300.
4
        http://trac.webkit.org/changeset/82295
5
        http://trac.webkit.org/changeset/82300
6
        https://bugs.webkit.org/show_bug.cgi?id=57380
7
8
        This patch breaks compile on Chromium (Requested by
9
        abarth|gardener on #webkit).
10
11
        * public/WebAccessibilityRole.h:
12
        * src/AssertMatchingEnums.cpp:
13
1
2011-03-29  Mario Sanchez Prada  <msanchez@igalia.com>
14
2011-03-29  Mario Sanchez Prada  <msanchez@igalia.com>
2
15
3
        Reviewed by Adam Barth.
16
        Reviewed by Adam Barth.
- a/Source/WebKit/chromium/public/WebAccessibilityRole.h -5 lines
Lines 116-126 enum WebAccessibilityRole { a/Source/WebKit/chromium/public/WebAccessibilityRole.h_sec1
116
    WebAccessibilityRoleMenuListPopup,
116
    WebAccessibilityRoleMenuListPopup,
117
    WebAccessibilityRoleMenuListOption,
117
    WebAccessibilityRoleMenuListOption,
118
118
119
    WebAccessibilityRoleParagraph,
120
    WebAccessibilityRoleLabel,
121
    WebAccessibilityRoleDiv,
122
    WebAccessibilityRoleForm,
123
124
    WebAccessibilityRoleLandmarkApplication,
119
    WebAccessibilityRoleLandmarkApplication,
125
    WebAccessibilityRoleLandmarkBanner,
120
    WebAccessibilityRoleLandmarkBanner,
126
    WebAccessibilityRoleLandmarkComplementary,
121
    WebAccessibilityRoleLandmarkComplementary,
- a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp -4 lines
Lines 173-182 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeItemRole, TreeItemRole); a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp_sec1
173
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDirectory, DirectoryRole);
173
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDirectory, DirectoryRole);
174
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleEditableText, EditableTextRole);
174
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleEditableText, EditableTextRole);
175
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListItem, ListItemRole);
175
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListItem, ListItemRole);
176
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleParagraph, ParagraphRole);
177
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLabel, LabelRole);
178
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDiv, LabelRole);
179
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleForm, FormRole);
180
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkApplication, LandmarkApplicationRole);
176
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkApplication, LandmarkApplicationRole);
181
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkBanner, LandmarkBannerRole);
177
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkBanner, LandmarkBannerRole);
182
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkComplementary, LandmarkComplementaryRole);
178
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkComplementary, LandmarkComplementaryRole);

Return to Bug 57380