Diff
Modified: trunk/LayoutTests/ChangeLog (207582 => 207583)
--- trunk/LayoutTests/ChangeLog 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/LayoutTests/ChangeLog 2016-10-20 02:33:19 UTC (rev 207583)
@@ -1,3 +1,16 @@
+2016-10-19 Nan Wang <n_w...@apple.com>
+
+ AX: [Mac] Mark element AXAPI should comform to specs
+ https://bugs.webkit.org/show_bug.cgi?id=163707
+
+ Reviewed by Chris Fleizach.
+
+ Added the modified roles-computedRoleString-expected.txt in mac platform so
+ that the exposed mark element won't affect other platform.
+
+ * platform/mac/accessibility/roles-computedRoleString-expected.txt: Added.
+ * platform/mac/accessibility/roles-exposed-expected.txt:
+
2016-10-19 Myles C. Maxfield <mmaxfi...@apple.com>
CSS font-variation-settings does not handle uppercase axis names in variable fonts
Added: trunk/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt (0 => 207583)
--- trunk/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt 2016-10-20 02:33:19 UTC (rev 207583)
@@ -0,0 +1,184 @@
+This tests that native elements and ARIA overrides result in the same ARIA computed role, regardless of platform.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS: a[href] -> link.
+PASS: article -> article.
+PASS: aside -> complementary.
+PASS: button -> button.
+PASS: dfn -> definition.
+PASS: dl -> .
+PASS: footer -> .
+PASS: form -> form.
+PASS: header -> banner.
+PASS: h1 -> heading.
+PASS: h2 -> heading.
+PASS: h3 -> heading.
+PASS: h4 -> heading.
+PASS: h5 -> heading.
+PASS: h5 -> heading.
+PASS: hr -> separator.
+PASS: img[alt='X'] -> img.
+PASS: input[type='button'] -> button.
+PASS: input[type='checkbox'] -> checkbox.
+PASS: input[type='date'] -> .
+PASS: input[type='datetime'] -> .
+PASS: input[type='datetime-local'] -> .
+PASS: input[type='email'] -> .
+PASS: input[type='file'] -> button.
+PASS: input[type='image'] -> button.
+PASS: input[type='month'] -> .
+PASS: input[type='number'] -> .
+PASS: input[type='password'] -> .
+PASS: input[type='radio'] -> radio.
+PASS: input[type='range'] -> slider.
+PASS: input[type='reset'] -> button.
+PASS: input[type='search'] -> searchbox.
+PASS: input[type='submit'] -> button.
+PASS: input[type='tel'] -> .
+PASS: input[type='text'] -> .
+PASS: input[type='time'] -> .
+PASS: input[type='url'] -> .
+PASS: input[type='week'] -> .
+PASS: ins -> .
+PASS: mark -> .
+PASS: math -> math.
+PASS: meter -> progressbar.
+PASS: nav -> navigation.
+PASS: ol -> list.
+PASS: li -> listitem.
+PASS: p -> .
+PASS: pre -> group.
+PASS: progress -> progressbar.
+PASS: samp -> .
+PASS: section:not([aria-label]:not([aria-labelledby]) -> group.
+PASS: section[aria-label] -> region.
+PASS: section[aria-labelledby] -> region.
+PASS: select:not([multiple]) -> .
+PASS: select[multiple] -> listbox.
+PASS: option -> option.
+PASS: optgroup -> option.
+PASS: option -> option.
+PASS: option -> option.
+PASS: sub -> .
+PASS: sup -> .
+PASS: table -> table.
+PASS: tr -> row.
+PASS: th -> columnheader.
+PASS: tr -> row.
+PASS: td -> cell.
+PASS: tr -> row.
+PASS: td -> cell.
+PASS: table[role="grid"] -> grid.
+PASS: tr -> row.
+PASS: th -> columnheader.
+PASS: tr -> row.
+PASS: td[role="gridcell"] -> gridcell.
+PASS: tr -> row.
+PASS: td[role="gridcell"] -> gridcell.
+PASS: textarea -> textbox.
+PASS: ul -> list.
+PASS: li -> listitem.
+PASS: var -> .
+PASS: div[role="command"] -> .
+PASS: div[role="composite"] -> .
+PASS: div[role="input"] -> .
+PASS: div[role="landmark"] -> .
+PASS: div[role="range"] -> .
+PASS: div[role="roletype"] -> .
+PASS: div[role="section"] -> .
+PASS: div[role="sectionhead"] -> .
+PASS: div[role="select"] -> .
+PASS: div[role="structure"] -> .
+PASS: div[role="widget"] -> .
+PASS: div[role="window"] -> .
+PASS: div[role="alert"] -> alert.
+PASS: div[role="alertdialog"] -> alertdialog.
+PASS: div[role="application"] -> application.
+PASS: div[role="article"] -> article.
+PASS: div[role="banner"] -> banner.
+PASS: div[role="button"] -> button.
+PASS: div[role="checkbox"] -> checkbox.
+PASS: div[role="combobox"] -> combobox.
+PASS: div[role="complementary"] -> complementary.
+PASS: div[role="contentinfo"] -> contentinfo.
+PASS: div[role="definition"] -> definition.
+PASS: div[role="dialog"] -> dialog.
+PASS: div[role="directory"] -> list.
+PASS: div[role="document"] -> document.
+PASS: div[role="form"] -> form.
+PASS: div[role="grid"] -> grid.
+PASS: div[role="row"] -> row.
+PASS: div[role="rowheader"] -> rowheader.
+PASS: div[role="columnheader"] -> columnheader.
+PASS: div[role="gridcell"] -> gridcell.
+PASS: div[role="group"] -> group.
+PASS: div[role="heading"] -> heading.
+PASS: div[role="img"] -> img.
+PASS: div[role="link"] -> link.
+PASS: div[role="list"] -> list.
+PASS: div[role="listitem"] -> listitem.
+PASS: div[role="listbox"] -> listbox.
+PASS: div[role="option"] -> option.
+PASS: div[role="log"] -> log.
+PASS: div[role="main"] -> main.
+PASS: div[role="marquee"] -> marquee.
+PASS: div[role="math"] -> math.
+PASS: div[role="menu"] -> menu.
+PASS: div[role="menuitem"] -> menuitem.
+PASS: div[role="menuitemcheckbox"] -> menuitemcheckbox.
+PASS: div[role="menuitemradio"] -> menuitemradio.
+PASS: div[role="menubar"] -> menubar.
+PASS: div[role="menuitem"] -> menuitem.
+PASS: div[role="menuitemcheckbox"] -> menuitemcheckbox.
+PASS: div[role="menuitemradio"] -> menuitemradio.
+PASS: div[role="navigation"] -> navigation.
+PASS: div[role="note"] -> note.
+PASS: div[role="progressbar"] -> progressbar.
+PASS: div[role="radiogroup"] -> radiogroup.
+PASS: div[role="radio"] -> radio.
+PASS: div[role="region"] -> region.
+PASS: div[role="scrollbar"] -> scrollbar.
+PASS: div[role="search"] -> search.
+PASS: div[role="separator"] -> separator.
+PASS: div[role="slider"] -> slider.
+PASS: div[role="spinbutton"] -> spinbutton.
+PASS: div[role="status"] -> status.
+PASS: div[role="tablist"] -> tablist.
+PASS: div[role="tab"] -> tab.
+PASS: div[role="tabpanel"] -> tabpanel.
+PASS: div[role="textbox"] -> .
+PASS: div[role="timer"] -> timer.
+PASS: div[role="toolbar"] -> toolbar.
+PASS: div[role="tooltip"] -> tooltip.
+PASS: div[role="tree"] -> tree.
+PASS: div[role="treeitem"] -> treeitem.
+PASS: div[role="treeitem"] -> treeitem.
+PASS: div[role="treegrid"] -> grid.
+PASS: div[role="row"] -> row.
+PASS: div[role="rowheader"] -> rowheader.
+PASS: div[role="columnheader"] -> columnheader.
+PASS: div[role="gridcell"] -> gridcell.
+PASS: div[role="button foo"] -> button.
+PASS: div[role="foo button bar"] -> button.
+PASS: div[role="foo button bar"] -> button.
+PASS: div[role="foo button bar"] -> .
+PASS: div[role="foo
+button
+bar"] -> .
+PASS: img[role="foo"] -> img.
+PASS: img[role="foo bar"] -> img.
+PASS: img[role="foo bar"] -> img.
+PASS: img[role="foo bar"] -> img.
+PASS: img[role="foo
+bar"] -> img.
+PASS: img[role="text"] -> text.
+PASS: img[role="text img"] -> text.
+PASS: img[role="img text"] -> img.
+PASS: img[role="presentation"][aria-label] -> img.
+PASS: a[role="foo bar"] -> link.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Modified: trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt (207582 => 207583)
--- trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt 2016-10-20 02:33:19 UTC (rev 207583)
@@ -355,9 +355,9 @@
AXRoleDescription:
mark
- AXRole:
+ AXRole: AXGroup
AXSubrole:
- AXRoleDescription:
+ AXRoleDescription: highlighted
math
AXRole: AXGroup
Modified: trunk/Source/WebCore/ChangeLog (207582 => 207583)
--- trunk/Source/WebCore/ChangeLog 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/Source/WebCore/ChangeLog 2016-10-20 02:33:19 UTC (rev 207583)
@@ -1,3 +1,30 @@
+2016-10-19 Nan Wang <n_w...@apple.com>
+
+ AX: [Mac] Mark element AXAPI should comform to specs
+ https://bugs.webkit.org/show_bug.cgi?id=163707
+
+ Reviewed by Chris Fleizach.
+
+ Created a new role for mark elements on Mac and exposed the role
+ description.
+
+ Changes are covered in modified test expectaions.
+
+ * English.lproj/Localizable.strings:
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
+ * accessibility/mac/AccessibilityObjectMac.mm:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (createAccessibilityRoleMap):
+ (-[WebAccessibilityObjectWrapper roleDescription]):
+ * platform/LocalizedStrings.cpp:
+ (WebCore::AXMarkText):
+ * platform/LocalizedStrings.h:
+
2016-10-19 Alex Christensen <achristen...@webkit.org>
Re-enable URLParser for non-Safari Cocoa apps after r207321
Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (207582 => 207583)
--- trunk/Source/WebCore/English.lproj/Localizable.strings 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings 2016-10-20 02:33:19 UTC (rev 207583)
@@ -913,6 +913,9 @@
/* accessibility label for hide closed captions button */
"hide closed captions" = "hide closed captions";
+/* accessibility role description for a mark element */
+"highlighted" = "highlighted";
+
/* accessibility role description for image map */
"image map" = "image map";
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (207582 => 207583)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.h 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h 2016-10-20 02:33:19 UTC (rev 207583)
@@ -160,6 +160,7 @@
ListBoxOptionRole,
ListItemRole,
ListMarkerRole,
+ MarkRole,
MathElementRole,
MatteRole,
MenuRole,
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (207582 => 207583)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2016-10-20 02:33:19 UTC (rev 207583)
@@ -2741,6 +2741,9 @@
if (node && node->hasTagName(captionTag))
return CaptionRole;
+
+ if (node && node->hasTagName(markTag))
+ return MarkRole;
if (node && node->hasTagName(preTag))
return PreRole;
Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (207582 => 207583)
--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2016-10-20 02:33:19 UTC (rev 207583)
@@ -857,6 +857,7 @@
case ListRole:
case ListBoxRole:
case ListItemRole:
+ case MarkRole:
case MathElementRole:
case MatteRole:
case MenuRole:
Modified: trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm (207582 => 207583)
--- trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm 2016-10-20 02:33:19 UTC (rev 207583)
@@ -86,6 +86,9 @@
if (roleValue() == CaptionRole)
return IgnoreObject;
+
+ if (roleValue() == MarkRole)
+ return IncludeObject;
// Never expose an unknown object on the Mac. Clients of the AX API will not know what to do with it.
// Special case is when the unknown object is actually an attachment.
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (207582 => 207583)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2016-10-20 02:33:19 UTC (rev 207583)
@@ -2213,6 +2213,7 @@
{ SVGTextRole, NSAccessibilityGroupRole },
{ SVGTSpanRole, NSAccessibilityGroupRole },
{ InlineRole, NSAccessibilityGroupRole },
+ { MarkRole, NSAccessibilityGroupRole },
};
AccessibilityRoleMap& roleMap = *new AccessibilityRoleMap;
@@ -2498,6 +2499,8 @@
return AXDetailsText();
case FooterRole:
return AXFooterRoleDescriptionText();
+ case MarkRole:
+ return AXMarkText();
case VideoRole:
return localizedMediaControlElementString("VideoElement");
default:
Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (207582 => 207583)
--- trunk/Source/WebCore/platform/LocalizedStrings.cpp 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp 2016-10-20 02:33:19 UTC (rev 207583)
@@ -781,6 +781,11 @@
return WEB_UI_STRING("separator", "accessibility role description for a horizontal rule [<hr>]");
}
+String AXMarkText()
+{
+ return WEB_UI_STRING("highlighted", "accessibility role description for a mark element");
+}
+
#if ENABLE(METER_ELEMENT)
String AXMeterGaugeRegionOptimumText()
{
Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (207582 => 207583)
--- trunk/Source/WebCore/platform/LocalizedStrings.h 2016-10-20 00:47:39 UTC (rev 207582)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h 2016-10-20 02:33:19 UTC (rev 207583)
@@ -196,6 +196,7 @@
#if PLATFORM(COCOA)
String AXARIAContentGroupText(const String& ariaType);
String AXHorizontalRuleDescriptionText();
+ String AXMarkText();
#if ENABLE(METER_ELEMENT)
String AXMeterGaugeRegionOptimumText();
String AXMeterGaugeRegionSuboptimalText();