| Differences between
and this patch
- a/Source/WebCore/accessibility/AccessibilityNodeObject.cpp -1 / +1 lines
Lines 375-381 AccessibilityRole AccessibilityNodeObject::determineAccessibilityRoleFromNode(Tr a/Source/WebCore/accessibility/AccessibilityNodeObject.cpp_sec1
375
        return AccessibilityRole::Caption;
375
        return AccessibilityRole::Caption;
376
    if (node()->hasTagName(dialogTag))
376
    if (node()->hasTagName(dialogTag))
377
        return AccessibilityRole::ApplicationDialog;
377
        return AccessibilityRole::ApplicationDialog;
378
    if (node()->hasTagName(markTag))
378
    if (node()->hasTagName(markTag) || equalLettersIgnoringASCIICase(getAttribute(roleAttr), "mark"_s))
379
        return AccessibilityRole::Mark;
379
        return AccessibilityRole::Mark;
380
    if (node()->hasTagName(preTag))
380
    if (node()->hasTagName(preTag))
381
        return AccessibilityRole::Pre;
381
        return AccessibilityRole::Pre;
- a/Source/WebCore/accessibility/AccessibilityObject.cpp +1 lines
Lines 2554-2559 static void initializeRoleMap() a/Source/WebCore/accessibility/AccessibilityObject.cpp_sec1
2554
        { "main"_s, AccessibilityRole::LandmarkMain },
2554
        { "main"_s, AccessibilityRole::LandmarkMain },
2555
        { "marquee"_s, AccessibilityRole::ApplicationMarquee },
2555
        { "marquee"_s, AccessibilityRole::ApplicationMarquee },
2556
        { "math"_s, AccessibilityRole::DocumentMath },
2556
        { "math"_s, AccessibilityRole::DocumentMath },
2557
        { "mark"_s, AccessibilityRole::Mark },
2557
        { "menu"_s, AccessibilityRole::Menu },
2558
        { "menu"_s, AccessibilityRole::Menu },
2558
        { "menubar"_s, AccessibilityRole::MenuBar },
2559
        { "menubar"_s, AccessibilityRole::MenuBar },
2559
        { "menuitem"_s, AccessibilityRole::MenuItem },
2560
        { "menuitem"_s, AccessibilityRole::MenuItem },
- a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm +8 lines
Lines 2827-2832 - (BOOL)accessibilityIsLastItemInSuggestion a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm_sec1
2827
    return NO;
2827
    return NO;
2828
}
2828
}
2829
2829
2830
- (BOOL)accessibilityIsMarkAnnotation
2831
{
2832
    if (![self _prepareAccessibilityCall])
2833
        return NO;
2834
    
2835
    return ancestorWithRole(*self.axBackingObject, { AccessibilityRole::Mark }) != nullptr;
2836
}
2837
2830
- (NSArray<NSString *> *)accessibilitySpeechHint
2838
- (NSArray<NSString *> *)accessibilitySpeechHint
2831
{
2839
{
2832
    if (![self _prepareAccessibilityCall])
2840
    if (![self _prepareAccessibilityCall])
- a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm +2 lines
Lines 865-870 static void AXAttributeStringSetStyle(NSMutableAttributedString* attrString, Ren a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm_sec1
865
                AXAttributeStringSetNumber(attrString, @"AXIsSuggestedDeletion", @YES, range);
865
                AXAttributeStringSetNumber(attrString, @"AXIsSuggestedDeletion", @YES, range);
866
            else if (equalLettersIgnoringASCIICase(roleValue, "suggestion"_s))
866
            else if (equalLettersIgnoringASCIICase(roleValue, "suggestion"_s))
867
                AXAttributeStringSetNumber(attrString, @"AXIsSuggestion", @YES, range);
867
                AXAttributeStringSetNumber(attrString, @"AXIsSuggestion", @YES, range);
868
            else if (equalLettersIgnoringASCIICase(roleValue, "mark"_s))
869
                AXAttributeStringSetNumber(attrString, @"AXHighlight", @YES, range);
868
        }
870
        }
869
    }
871
    }
870
}
872
}
- a/Tools/DumpRenderTree/AccessibilityUIElement.cpp +6 lines
Lines 1660-1665 static JSValueRef getIsLastItemInSuggestionCallback(JSContextRef context, JSObje a/Tools/DumpRenderTree/AccessibilityUIElement.cpp_sec1
1660
    return JSValueMakeBoolean(context, toAXElement(thisObject)->isLastItemInSuggestion());
1660
    return JSValueMakeBoolean(context, toAXElement(thisObject)->isLastItemInSuggestion());
1661
}
1661
}
1662
1662
1663
static JSValueRef getIsMarkAnnotationCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
1664
{
1665
    return JSValueMakeBoolean(context, toAXElement(thisObject)->isMarkAnnotation());
1666
}
1667
1663
#endif // PLATFORM(IOS_FAMILY)
1668
#endif // PLATFORM(IOS_FAMILY)
1664
1669
1665
#if PLATFORM(MAC) && !PLATFORM(IOS_FAMILY)
1670
#if PLATFORM(MAC) && !PLATFORM(IOS_FAMILY)
Lines 2023-2028 JSClassRef AccessibilityUIElement::getJSClass() a/Tools/DumpRenderTree/AccessibilityUIElement.cpp_sec2
2023
        { "isDeletion", getIsDeletionCallback, 0 , kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
2028
        { "isDeletion", getIsDeletionCallback, 0 , kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
2024
        { "isFirstItemInSuggesiton", getIsFirstItemInSuggestionCallback, 0 , kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
2029
        { "isFirstItemInSuggesiton", getIsFirstItemInSuggestionCallback, 0 , kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
2025
        { "isLastItemInSuggesiton", getIsLastItemInSuggestionCallback, 0 , kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
2030
        { "isLastItemInSuggesiton", getIsLastItemInSuggestionCallback, 0 , kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
2031
        { "isMarkAnnotation", getIsMarkAnnotationCallback, 0 , kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
2026
#endif // PLATFORM(IOS_FAMILY)
2032
#endif // PLATFORM(IOS_FAMILY)
2027
#if PLATFORM(MAC) && !PLATFORM(IOS_FAMILY)
2033
#if PLATFORM(MAC) && !PLATFORM(IOS_FAMILY)
2028
        { "supportedActions", supportedActionsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
2034
        { "supportedActions", supportedActionsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- a/Tools/DumpRenderTree/AccessibilityUIElement.h +2 lines
Lines 327-332 public: a/Tools/DumpRenderTree/AccessibilityUIElement.h_sec1
327
    bool isTextArea() const;
327
    bool isTextArea() const;
328
    bool isSearchField() const;
328
    bool isSearchField() const;
329
    
329
    
330
    bool isMarkAnnotation() const;
331
330
    AccessibilityTextMarkerRange textMarkerRangeMatchesTextNearMarkers(JSStringRef, AccessibilityTextMarker*, AccessibilityTextMarker*);
332
    AccessibilityTextMarkerRange textMarkerRangeMatchesTextNearMarkers(JSStringRef, AccessibilityTextMarker*, AccessibilityTextMarker*);
331
#endif // PLATFORM(IOS_FAMILY)
333
#endif // PLATFORM(IOS_FAMILY)
332
334
- a/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm +6 lines
Lines 106-111 - (BOOL)accessibilityIsInsertion; a/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm_sec1
106
- (BOOL)accessibilityIsDeletion;
106
- (BOOL)accessibilityIsDeletion;
107
- (BOOL)accessibilityIsFirstItemInSuggestion;
107
- (BOOL)accessibilityIsFirstItemInSuggestion;
108
- (BOOL)accessibilityIsLastItemInSuggestion;
108
- (BOOL)accessibilityIsLastItemInSuggestion;
109
- (BOOL)accessibilityIsMarkAnnotation;
109
110
110
// TextMarker related
111
// TextMarker related
111
- (NSArray *)textMarkerRange;
112
- (NSArray *)textMarkerRange;
Lines 1304-1306 bool AccessibilityUIElement::isLastItemInSuggestion() a/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm_sec2
1304
{
1305
{
1305
    return [m_element accessibilityIsLastItemInSuggestion];
1306
    return [m_element accessibilityIsLastItemInSuggestion];
1306
}
1307
}
1308
1309
bool AccessibilityUIElement::isMarkAnnotation() const
1310
{
1311
    return [m_element accessibilityIsMarkAnnotation];
1312
}
- a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp +1 lines
Lines 89-94 JSRetainPtr<JSStringRef> AccessibilityUIElement::attributedStringForElement() { a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp_sec1
89
bool AccessibilityUIElement::isInTable() const { return false; }
89
bool AccessibilityUIElement::isInTable() const { return false; }
90
bool AccessibilityUIElement::isInLandmark() const { return false; }
90
bool AccessibilityUIElement::isInLandmark() const { return false; }
91
bool AccessibilityUIElement::isInList() const { return false; }
91
bool AccessibilityUIElement::isInList() const { return false; }
92
bool AccessibilityUIElement::isMarkAnnotation() const { return false; }
92
#endif
93
#endif
93
    
94
    
94
// Unsupported methods on various platforms. As they're implemented on other platforms this list should be modified.
95
// Unsupported methods on various platforms. As they're implemented on other platforms this list should be modified.
- a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h +2 lines
Lines 407-412 public: a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h_sec1
407
    bool isDeletion() const;
407
    bool isDeletion() const;
408
    bool isFirstItemInSuggestion() const;
408
    bool isFirstItemInSuggestion() const;
409
    bool isLastItemInSuggestion() const;
409
    bool isLastItemInSuggestion() const;
410
    
411
    bool isMarkAnnotation() const;
410
private:
412
private:
411
    AccessibilityUIElement(PlatformUIElement);
413
    AccessibilityUIElement(PlatformUIElement);
412
    AccessibilityUIElement(const AccessibilityUIElement&);
414
    AccessibilityUIElement(const AccessibilityUIElement&);
- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl +1 lines
Lines 294-299 a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl_sec1
294
    undefined assistiveTechnologySimulatedFocus();
294
    undefined assistiveTechnologySimulatedFocus();
295
    readonly attribute boolean isSearchField;
295
    readonly attribute boolean isSearchField;
296
    readonly attribute boolean isTextArea;
296
    readonly attribute boolean isTextArea;
297
    readonly attribute boolean isMarkAnnotation;
297
298
298
    readonly attribute boolean hasDocumentRoleAncestor;
299
    readonly attribute boolean hasDocumentRoleAncestor;
299
    readonly attribute boolean hasWebApplicationAncestor;
300
    readonly attribute boolean hasWebApplicationAncestor;
- a/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm +6 lines
Lines 125-130 - (BOOL)accessibilityIsDeletion; a/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm_sec1
125
- (BOOL)accessibilityIsInsertion;
125
- (BOOL)accessibilityIsInsertion;
126
- (BOOL)accessibilityIsFirstItemInSuggestion;
126
- (BOOL)accessibilityIsFirstItemInSuggestion;
127
- (BOOL)accessibilityIsLastItemInSuggestion;
127
- (BOOL)accessibilityIsLastItemInSuggestion;
128
- (BOOL)accessibilityIsMarkAnnotation;
128
129
129
// TextMarker related
130
// TextMarker related
130
- (NSArray *)textMarkerRange;
131
- (NSArray *)textMarkerRange;
Lines 1522-1525 bool AccessibilityUIElement::isLastItemInSuggestion() const a/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm_sec2
1522
    return [m_element accessibilityIsLastItemInSuggestion];
1523
    return [m_element accessibilityIsLastItemInSuggestion];
1523
}
1524
}
1524
1525
1526
bool AccessibilityUIElement::isMarkAnnotation() const
1527
{
1528
    return [m_element accessibilityIsMarkAnnotation];
1529
}
1530
1525
} // namespace WTR
1531
} // namespace WTR
- a/LayoutTests/accessibility/display-contents-element-roles-expected.txt +1 lines
Lines 95-100 This test ensures elements with CSS display: contents have the correct role. a/LayoutTests/accessibility/display-contents-element-roles-expected.txt_sec1
95
95
96
<mark class="testcase" id="mark"></mark>
96
<mark class="testcase" id="mark"></mark>
97
    AXRole: AXGroup
97
    AXRole: AXGroup
98
    computedRoleString: mark
98
99
99
<menu class="testcase" type="toolbar" id="menu-toolbar"></menu>
100
<menu class="testcase" type="toolbar" id="menu-toolbar"></menu>
100
    AXRole: AXToolbar
101
    AXRole: AXToolbar
- a/LayoutTests/accessibility/ios-simulator/mark-role-expected.txt +9 lines
Line 0 a/LayoutTests/accessibility/ios-simulator/mark-role-expected.txt_sec1
1
This test makes sure that the mark role exposes the right attributes.
2
PASS: highlight1.isMarkAnnotation === true
3
4
PASS successfullyParsed is true
5
6
TEST COMPLETE
7
This is some
8
highlighted
9
text.
- a/LayoutTests/accessibility/ios-simulator/mark-role.html +25 lines
Line 0 a/LayoutTests/accessibility/ios-simulator/mark-role.html_sec1
1
<!DOCTYPE HTML PUBLIC>
2
<html>
3
<head>
4
<script src="../../resources/js-test.js"></script>
5
<script src="../../resources/accessibility-helper.js"></script>
6
</head>
7
<body>
8
9
<div>This is some <div id="highlight1" role="mark">highlighted</div> text.</div>
10
11
<script>
12
13
    if (window.accessibilityController) {
14
        let output = "This test makes sure that the mark role exposes the right attributes.\n";
15
16
        var highlight1 = accessibilityController.accessibleElementById("highlight1").childAtIndex(0);
17
        output += expect("highlight1.isMarkAnnotation", "true");
18
19
        debug(output);
20
    }
21
22
</script>
23
24
</body>
25
</html>
- a/LayoutTests/accessibility/mac/mark-role-expected.txt +11 lines
Line 0 a/LayoutTests/accessibility/mac/mark-role-expected.txt_sec1
1
This test makes sure that the mark role exposes the right attributes in the attriubuted string.
2
PASS: highlight1.attributedStringForTextMarkerRangeContainsAttribute('AXHighlight', markerRange) === true
3
PASS: highlight2.attributedStringForTextMarkerRangeContainsAttribute('AXHighlight', markerRange) === true
4
5
PASS successfullyParsed is true
6
7
TEST COMPLETE
8
This is some
9
highlighted
10
text.
11
This is some highlighted text.
- a/LayoutTests/accessibility/mac/mark-role.html +31 lines
Line 0 a/LayoutTests/accessibility/mac/mark-role.html_sec1
1
<!DOCTYPE HTML PUBLIC>
2
<html>
3
<head>
4
<script src="../../resources/js-test.js"></script>
5
<script src="../../resources/accessibility-helper.js"></script>
6
</head>
7
<body>
8
9
<div>This is some <div id="highlight1" role="mark">highlighted</div> text.</div>
10
<div>This is some <mark id="highlight2">highlighted</mark> text.</div>
11
12
<script>
13
14
    if (window.accessibilityController) {
15
        let output = "This test makes sure that the mark role exposes the right attributes in the attriubuted string.\n";
16
17
        var highlight1 = accessibilityController.accessibleElementById("highlight1").childAtIndex(0);
18
        var markerRange = highlight1.textMarkerRangeForElement(highlight1);
19
        output += expect("highlight1.attributedStringForTextMarkerRangeContainsAttribute('AXHighlight', markerRange)", "true");
20
21
        var highlight2 = accessibilityController.accessibleElementById("highlight2").childAtIndex(0);
22
        var markerRange = highlight2.textMarkerRangeForElement(highlight2);
23
        output += expect("highlight2.attributedStringForTextMarkerRangeContainsAttribute('AXHighlight', markerRange)", "true");
24
25
        debug(output);
26
    }
27
28
</script>
29
30
</body>
31
</html>
- a/LayoutTests/accessibility/roles-computedRoleString.html -1 / +1 lines
Lines 55-61 a/LayoutTests/accessibility/roles-computedRoleString.html_sec1
55
<input type="url" value="X" data-role="" data-platform="atspi,mac" class="ex" data-note="[type='url']">
55
<input type="url" value="X" data-role="" data-platform="atspi,mac" class="ex" data-note="[type='url']">
56
<input type="week" value="X" data-role="" data-platform="atspi,mac" class="ex" data-note="[type='week']">
56
<input type="week" value="X" data-role="" data-platform="atspi,mac" class="ex" data-note="[type='week']">
57
<ins data-role="insertion" data-platform="atspi,mac" class="ex">X</ins>
57
<ins data-role="insertion" data-platform="atspi,mac" class="ex">X</ins>
58
<mark data-role="" data-platform="atspi,mac" class="ex">X</mark>
58
<mark data-role="mark" data-platform="atspi,mac" class="ex">X</mark>
59
<math data-role="math" data-platform="atspi,mac" class="ex">X</math>
59
<math data-role="math" data-platform="atspi,mac" class="ex">X</math>
60
<!-- skipped <menu> -->
60
<!-- skipped <menu> -->
61
<!-- skipped <meta> -->
61
<!-- skipped <meta> -->
- a/LayoutTests/platform/glib/accessibility/aria-visible-element-roles-expected.txt +1 lines
Lines 161-166 This test ensures ARIA visible elements (e.g. those with both `hidden` and `aria a/LayoutTests/platform/glib/accessibility/aria-visible-element-roles-expected.txt_sec1
161
161
162
<mark hidden="" aria-hidden="false" id="mark"></mark>
162
<mark hidden="" aria-hidden="false" id="mark"></mark>
163
163
164
    computedRoleString: mark
164
165
165
<pre hidden="" aria-hidden="false" id="pre"></pre>
166
<pre hidden="" aria-hidden="false" id="pre"></pre>
166
    AXRole: AXSection
167
    AXRole: AXSection
- a/LayoutTests/platform/glib/accessibility/display-contents-element-roles-expected.txt +1 lines
Lines 81-86 This test ensures elements with CSS display: contents have the correct role. a/LayoutTests/platform/glib/accessibility/display-contents-element-roles-expected.txt_sec1
81
81
82
<mark class="testcase" id="mark"></mark>
82
<mark class="testcase" id="mark"></mark>
83
83
84
    computedRoleString: mark
84
85
85
<menu class="testcase" type="toolbar" id="menu-toolbar"></menu>
86
<menu class="testcase" type="toolbar" id="menu-toolbar"></menu>
86
    AXRole: AXToolbar
87
    AXRole: AXToolbar
- a/LayoutTests/platform/mac-wk1/accessibility/aria-visible-element-roles-expected.txt +1 lines
Lines 179-184 This test ensures ARIA visible elements (e.g. those with both `hidden` and `aria a/LayoutTests/platform/mac-wk1/accessibility/aria-visible-element-roles-expected.txt_sec1
179
179
180
<mark hidden="" aria-hidden="false" id="mark"></mark>
180
<mark hidden="" aria-hidden="false" id="mark"></mark>
181
    AXRole: AXGroup
181
    AXRole: AXGroup
182
    computedRoleString: mark
182
183
183
<pre hidden="" aria-hidden="false" id="pre"></pre>
184
<pre hidden="" aria-hidden="false" id="pre"></pre>
184
    AXRole: AXGroup
185
    AXRole: AXGroup
- a/LayoutTests/platform/mac-wk2/accessibility/aria-visible-element-roles-expected.txt +1 lines
Lines 179-184 This test ensures ARIA visible elements (e.g. those with both `hidden` and `aria a/LayoutTests/platform/mac-wk2/accessibility/aria-visible-element-roles-expected.txt_sec1
179
179
180
<mark hidden="" aria-hidden="false" id="mark"></mark>
180
<mark hidden="" aria-hidden="false" id="mark"></mark>
181
    AXRole: AXGroup
181
    AXRole: AXGroup
182
    computedRoleString: mark
182
183
183
<pre hidden="" aria-hidden="false" id="pre"></pre>
184
<pre hidden="" aria-hidden="false" id="pre"></pre>
184
    AXRole: AXGroup
185
    AXRole: AXGroup
- a/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt -1 / +1 lines
Lines 43-49 PASS input[type='time'] -> . a/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt_sec1
43
PASS input[type='url'] -> .
43
PASS input[type='url'] -> .
44
PASS input[type='week'] -> .
44
PASS input[type='week'] -> .
45
PASS ins -> insertion.
45
PASS ins -> insertion.
46
PASS mark -> .
46
PASS mark -> mark.
47
PASS math -> math.
47
PASS math -> math.
48
PASS meter -> meter.
48
PASS meter -> meter.
49
PASS nav -> navigation.
49
PASS nav -> navigation.

Return to Bug 206251