Diff
Modified: trunk/LayoutTests/ChangeLog (216037 => 216038)
--- trunk/LayoutTests/ChangeLog 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/LayoutTests/ChangeLog 2017-05-01 22:52:36 UTC (rev 216038)
@@ -1,3 +1,19 @@
+2017-05-01 Chris Fleizach <[email protected]>
+
+ AX: Support time@datetime for verbosity clarification of dates, times, and durations
+ https://bugs.webkit.org/show_bug.cgi?id=171498
+ <rdar://problem/12985540>
+
+ Reviewed by Joanmarie Diggs.
+
+ * accessibility/datetime-attribute.html: Added.
+ * accessibility/roles-computedRoleString-expected.txt:
+ * platform/gtk/accessibility/datetime-attribute-expected.txt: Added.
+ * platform/gtk/accessibility/roles-exposed-expected.txt:
+ * platform/mac/accessibility/datetime-attribute-expected.txt: Added.
+ * platform/mac/accessibility/roles-computedRoleString-expected.txt:
+ * platform/mac/accessibility/roles-exposed-expected.txt:
+
2017-05-01 Matt Lewis <[email protected]>
Marked fast/mediastream/getUserMedia-webaudio.html as flaky timeout.
Added: trunk/LayoutTests/accessibility/datetime-attribute.html (0 => 216038)
--- trunk/LayoutTests/accessibility/datetime-attribute.html (rev 0)
+++ trunk/LayoutTests/accessibility/datetime-attribute.html 2017-05-01 22:52:36 UTC (rev 216038)
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body id="body">
+
+<time id="timeElement" datetime="P15H10M">15 hrs, 10 min</time>
+
+<p id="description"></p>
+<div id="console"></div>
+<script>
+ description("This tests that items with aria-selected are reported as selected children of the parent container.");
+
+ if (window.accessibilityController) {
+ var timeElement = accessibilityController.accessibleElementById("timeElement");
+ debug("Time 'role': " + timeElement.role);
+ debug("Time 'subrole': " + timeElement.subrole);
+ debug("Time 'value': " + timeElement.stringAttributeValue('AXDateTimeValue'));
+ }
+</script>
+
+<script src=""
+</body>
+</html>
Added: trunk/LayoutTests/platform/gtk/accessibility/datetime-attribute-expected.txt (0 => 216038)
--- trunk/LayoutTests/platform/gtk/accessibility/datetime-attribute-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/gtk/accessibility/datetime-attribute-expected.txt 2017-05-01 22:52:36 UTC (rev 216038)
@@ -0,0 +1,13 @@
+15 hrs, 10 min
+This tests that items with aria-selected are reported as selected children of the parent container.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Time 'role': AXRole: AXStatic
+Time 'subrole':
+Time 'value':
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Modified: trunk/LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt (216037 => 216038)
--- trunk/LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt 2017-05-01 22:52:36 UTC (rev 216038)
@@ -431,7 +431,7 @@
AXRole: AXTextField
time:not([datetime])
- AXRole:
+ AXRole: AXStatic
time[datetime]
AXRole: AXStatic
Added: trunk/LayoutTests/platform/mac/accessibility/datetime-attribute-expected.txt (0 => 216038)
--- trunk/LayoutTests/platform/mac/accessibility/datetime-attribute-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/datetime-attribute-expected.txt 2017-05-01 22:52:36 UTC (rev 216038)
@@ -0,0 +1,13 @@
+15 hrs, 10 min
+This tests that items with aria-selected are reported as selected children of the parent container.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Time 'role': AXRole: AXGroup
+Time 'subrole': AXSubrole: AXTimeGroup
+Time 'value': P15H10M
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Modified: trunk/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt (216037 => 216038)
--- trunk/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt 2017-05-01 22:52:36 UTC (rev 216038)
@@ -78,6 +78,7 @@
PASS: tr -> row.
PASS: td[role="gridcell"] -> gridcell.
PASS: textarea -> textbox.
+PASS: time -> .
PASS: ul -> list.
PASS: li -> listitem.
PASS: var -> .
Modified: trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt (216037 => 216038)
--- trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt 2017-05-01 22:52:36 UTC (rev 216038)
@@ -720,14 +720,14 @@
AXRoleDescription: text entry area
time:not([datetime])
- AXRole:
- AXSubrole:
- AXRoleDescription:
+ AXRole: AXGroup
+ AXSubrole: AXTimeGroup
+ AXRoleDescription: group
time[datetime]
- AXRole:
- AXSubrole:
- AXRoleDescription:
+ AXRole: AXGroup
+ AXSubrole: AXTimeGroup
+ AXRoleDescription: group
ul
AXRole: AXList
Modified: trunk/Source/WebCore/ChangeLog (216037 => 216038)
--- trunk/Source/WebCore/ChangeLog 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/Source/WebCore/ChangeLog 2017-05-01 22:52:36 UTC (rev 216038)
@@ -1,3 +1,30 @@
+2017-05-01 Chris Fleizach <[email protected]>
+
+ AX: Support time@datetime for verbosity clarification of dates, times, and durations
+ https://bugs.webkit.org/show_bug.cgi?id=171498
+ <rdar://problem/12985540>
+
+ Reviewed by Joanmarie Diggs.
+
+ Expose the datetime attribute value.
+
+ Test: accessibility/datetime-attribute.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::datetimeAttributeValue):
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
+ (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
+ (-[WebAccessibilityObjectWrapper accessibilityDatetimeValue]):
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
+ (createAccessibilityRoleMap):
+ (-[WebAccessibilityObjectWrapper subrole]):
+ (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+
2017-05-01 Joseph Pecoraro <[email protected]>
RejectedPromiseTracker should produce better callstacks and avoid capturing callstacks unless there is a debugger/inspector
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (216037 => 216038)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2017-05-01 22:52:36 UTC (rev 216038)
@@ -2380,6 +2380,11 @@
return hasTagName(insTag) || hasTagName(delTag) || hasTagName(timeTag);
}
+const AtomicString& AccessibilityObject::datetimeAttributeValue() const
+{
+ return getAttribute(datetimeAttr);
+}
+
Element* AccessibilityObject::element() const
{
Node* node = this->node();
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (216037 => 216038)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.h 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h 2017-05-01 22:52:36 UTC (rev 216038)
@@ -217,6 +217,7 @@
TextAreaRole,
TextGroupRole,
TermRole,
+ TimeRole,
TreeRole,
TreeGridRole,
TreeItemRole,
@@ -623,7 +624,8 @@
bool hasHighlighting() const;
bool supportsDatetimeAttribute() const;
-
+ const AtomicString& datetimeAttributeValue() const;
+
virtual bool canSetFocusAttribute() const { return false; }
virtual bool canSetTextRangeAttributes() const { return false; }
virtual bool canSetValueAttribute() const { return false; }
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (216037 => 216038)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2017-05-01 22:52:36 UTC (rev 216038)
@@ -1260,6 +1260,7 @@
case DocumentArticleRole:
case LandmarkRegionRole:
case ListItemRole:
+ case TimeRole:
case VideoRole:
return false;
default:
@@ -2796,6 +2797,9 @@
if (node && node->hasTagName(menuTag) && equalLettersIgnoringASCIICase(getAttribute(typeAttr), "toolbar"))
return ToolbarRole;
+ if (node && node->hasTagName(timeTag))
+ return TimeRole;
+
// If the element does not have role, but it has ARIA attributes, or accepts tab focus, accessibility should fallback to exposing it as a group.
if (supportsARIAAttributes() || canSetFocusAttribute())
return GroupRole;
Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp (216037 => 216038)
--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp 2017-05-01 22:52:36 UTC (rev 216038)
@@ -730,6 +730,7 @@
return ATK_ROLE_STATIC;
case SVGTextPathRole:
case SVGTSpanRole:
+ case TimeRole:
return ATK_ROLE_STATIC;
#endif
default:
Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (216037 => 216038)
--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2017-05-01 22:52:36 UTC (rev 216038)
@@ -935,6 +935,7 @@
case TableHeaderContainerRole:
case TermRole:
case TextGroupRole:
+ case TimeRole:
case TreeRole:
case TreeItemRole:
case TreeGridRole:
@@ -1276,6 +1277,17 @@
return m_object->blockquoteLevel();
}
+- (NSString *)accessibilityDatetimeValue
+{
+ if (![self _prepareAccessibilityCall])
+ return nil;
+
+ if (auto parent = AccessibilityObject::matchedParent(*m_object, true, [] (const AccessibilityObject& object) { return object.supportsDatetimeAttribute(); }))
+ return parent->datetimeAttributeValue();
+
+ return nil;
+}
+
- (NSString *)accessibilityPlaceholderValue
{
if (![self _prepareAccessibilityCall])
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (216037 => 216038)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2017-05-01 22:41:26 UTC (rev 216037)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2017-05-01 22:52:36 UTC (rev 216038)
@@ -188,6 +188,10 @@
#define NSAccessibilityGrabbedAttribute @"AXGrabbed"
#endif
+#ifndef NSAccessibilityDatetimeValueAttribute
+#define NSAccessibilityDatetimeValueAttribute @"AXDateTimeValue"
+#endif
+
#ifndef NSAccessibilityDropEffectsAttribute
#define NSAccessibilityDropEffectsAttribute @"AXDropEffects"
#endif
@@ -1170,6 +1174,9 @@
[additional addObject:NSAccessibilityValueAttribute];
}
+ if (m_object->supportsDatetimeAttribute())
+ [additional addObject:NSAccessibilityDatetimeValueAttribute];
+
if (m_object->supportsRequiredAttribute()) {
[additional addObject:NSAccessibilityRequiredAttribute];
}
@@ -1934,6 +1941,7 @@
{ SVGTSpanRole, NSAccessibilityGroupRole },
{ InlineRole, NSAccessibilityGroupRole },
{ MarkRole, NSAccessibilityGroupRole },
+ { TimeRole, NSAccessibilityGroupRole },
{ FeedRole, NSAccessibilityGroupRole },
{ FigureRole, NSAccessibilityGroupRole },
};
@@ -2132,7 +2140,9 @@
return @"AXDetails";
if (role == SummaryRole)
return @"AXSummary";
-
+ if (role == TimeRole)
+ return @"AXTimeGroup";
+
if (m_object->isMediaTimeline())
return NSAccessibilityTimelineSubrole;
@@ -3042,7 +3052,10 @@
if ([attributeName isEqualToString:NSAccessibilityHasPopupAttribute])
return [NSNumber numberWithBool:m_object->ariaHasPopup()];
-
+
+ if ([attributeName isEqualToString:NSAccessibilityDatetimeValueAttribute])
+ return m_object->datetimeAttributeValue();
+
// ARIA Live region attributes.
if ([attributeName isEqualToString:NSAccessibilityARIALiveAttribute])
return m_object->ariaLiveRegionStatus();