<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[207917] branches/safari-602-branch</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/207917">207917</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2016-10-26 16:17:52 -0700 (Wed, 26 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/206102">r206102</a>. rdar://problem/28744106</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari602branchLayoutTestsChangeLog">branches/safari-602-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari602branchSourceWebCoreChangeLog">branches/safari-602-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari602branchSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm">branches/safari-602-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm</a></li>
<li><a href="#branchessafari602branchToolsChangeLog">branches/safari-602-branch/Tools/ChangeLog</a></li>
<li><a href="#branchessafari602branchToolsDumpRenderTreeiosAccessibilityUIElementIOSmm">branches/safari-602-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm</a></li>
<li><a href="#branchessafari602branchToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm">branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari602branchLayoutTestsaccessibilityiossimulatordetailsummaryiosexpectedtxt">branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/detail-summary-ios-expected.txt</a></li>
<li><a href="#branchessafari602branchLayoutTestsaccessibilityiossimulatordetailsummaryioshtml">branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/detail-summary-ios.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari602branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/LayoutTests/ChangeLog (207916 => 207917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/ChangeLog        2016-10-26 23:17:48 UTC (rev 207916)
+++ branches/safari-602-branch/LayoutTests/ChangeLog        2016-10-26 23:17:52 UTC (rev 207917)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-10-26 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge r206102. rdar://problem/28744106
+
+ 2016-09-19 Nan Wang <n_wang@apple.com>
+
+ AX: Add accessibility support for details element on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=162041
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/ios-simulator/detail-summary-ios-expected.txt: Added.
+ * accessibility/ios-simulator/detail-summary-ios.html: Added.
+
</ins><span class="cx"> 2016-10-20 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r207486. rdar://problem/28409742
</span></span></pre></div>
<a id="branchessafari602branchLayoutTestsaccessibilityiossimulatordetailsummaryiosexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/detail-summary-ios-expected.txt (0 => 207917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/detail-summary-ios-expected.txt         (rev 0)
+++ branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/detail-summary-ios-expected.txt        2016-10-26 23:17:52 UTC (rev 207917)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+Summary1
+
+Detail1
+
+link
+Summary2
+
+This tests the details element on iOS.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS summary1.isExpanded is true
+PASS detail1.isExpanded is false
+PASS summary2.isExpanded is false
+PASS document.getElementById('summary1') === document.activeElement is false
+PASS document.getElementById('details1') === document.activeElement is false
+PASS document.getElementById('link') === document.activeElement is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="branchessafari602branchLayoutTestsaccessibilityiossimulatordetailsummaryioshtml"></a>
<div class="addfile"><h4>Added: branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/detail-summary-ios.html (0 => 207917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/detail-summary-ios.html         (rev 0)
+++ branches/safari-602-branch/LayoutTests/accessibility/ios-simulator/detail-summary-ios.html        2016-10-26 23:17:52 UTC (rev 207917)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<details open id="details1">
+ <summary id="summary1"><p id="s1">Summary1</p></summary>
+ <p id="d1">Detail1</p>
+ <a href="" id="link">link</a>
+</details>
+
+<details id="details2">
+ <summary><p id="s2">Summary2</p></summary>
+ <p>Detail2</p>
+</details>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests the details element on iOS.");
+
+ var callbackCount = 0;
+ if (window.accessibilityController) {
+
+ // Test that we are getting the expanded status for the summary text, but not for the details children.
+ var summary1 = accessibilityController.accessibleElementById("s1");
+ var detail1 = accessibilityController.accessibleElementById("d1");
+ var summary2 = accessibilityController.accessibleElementById("s2");
+ var link = accessibilityController.accessibleElementById("link");
+
+ shouldBeTrue("summary1.isExpanded");
+ shouldBeFalse("detail1.isExpanded");
+ shouldBeFalse("summary2.isExpanded");
+
+ // Test that VO focus onto the details children won't set focus to the summary/details element or its children.
+ summary1.assistiveTechnologySimulatedFocus();
+ shouldBeFalse("document.getElementById('summary1') === document.activeElement");
+
+ detail1.assistiveTechnologySimulatedFocus();
+ shouldBeFalse("document.getElementById('details1') === document.activeElement");
+
+ link.assistiveTechnologySimulatedFocus();
+ shouldBeFalse("document.getElementById('link') === document.activeElement");
+ }
+
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="branchessafari602branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (207916 => 207917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/ChangeLog        2016-10-26 23:17:48 UTC (rev 207916)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog        2016-10-26 23:17:52 UTC (rev 207917)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-10-26 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge r206102. rdar://problem/28744106
+
+ 2016-09-19 Nan Wang <n_wang@apple.com>
+
+ AX: Add accessibility support for details element on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=162041
+
+ Reviewed by Chris Fleizach.
+
+ The details and summary elements are poorly supported on iOS.
+ Two major issues:
+ 1. Assistive technologies taking focus onto details/summary elements will cause unexpected behavior.
+ 2. VoiceOver is not speaking the expanded status of the details element.
+ Fixed them by not setting focus onto elements inside details and exposing the details element's expanded
+ status to its summary's accessible children.
+
+ Test: accessibility/ios-simulator/detail-summary-ios.html
+
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (matchedParent):
+ (-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
+ (-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
+ (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
+ (-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
+ (-[WebAccessibilityObjectWrapper tableCellParent]):
+ (-[WebAccessibilityObjectWrapper tableParent]):
+ (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
+ (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
+ (-[WebAccessibilityObjectWrapper detailParentForSummaryObject:]):
+ (-[WebAccessibilityObjectWrapper detailParentForObject:]):
+ (-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]):
+ (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
+ (-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
+
</ins><span class="cx"> 2016-10-24 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r204472. rdar://problem/28544885
</span></span></pre></div>
<a id="branchessafari602branchSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (207916 => 207917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2016-10-26 23:17:48 UTC (rev 207916)
+++ branches/safari-602-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2016-10-26 23:17:52 UTC (rev 207917)
</span><span class="lines">@@ -131,6 +131,22 @@
</span><span class="cx"> return wrapper;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+template<typename MatchFunction>
+static AccessibilityObject* matchedParent(AccessibilityObject* object, bool includeSelf, const MatchFunction& matches)
+{
+ if (!object)
+ return nullptr;
+
+ AccessibilityObject* parent = includeSelf ? object : object->parentObject();
+ for (; parent; parent = parent->parentObject()) {
+ if (matches(parent))
+ return parent;
+ }
+
+ return nullptr;
+}
+
+
</ins><span class="cx"> #pragma mark Accessibility Text Marker
</span><span class="cx">
</span><span class="cx"> @interface WebAccessibilityTextMarker : NSObject
</span><span class="lines">@@ -533,42 +549,46 @@
</span><span class="cx">
</span><span class="cx"> - (AccessibilityObjectWrapper*)_accessibilityListAncestor
</span><span class="cx"> {
</span><del>- for (AccessibilityObject* parent = m_object->parentObject(); parent != nil; parent = parent->parentObject()) {
- AccessibilityRole role = parent->roleValue();
- if (role == ListRole || role == ListBoxRole)
- return parent->wrapper();
- }
</del><ins>+ auto matchFunc = [] (AccessibilityObject* object) {
+ AccessibilityRole role = object->roleValue();
+ return role == ListRole || role == ListBoxRole;
+ };
</ins><span class="cx">
</span><ins>+ if (AccessibilityObject* parent = matchedParent(m_object, false, matchFunc))
+ return parent->wrapper();
</ins><span class="cx"> return nil;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (AccessibilityObjectWrapper*)_accessibilityLandmarkAncestor
</span><span class="cx"> {
</span><del>- for (AccessibilityObject* parent = m_object->parentObject(); parent != nil; parent = parent->parentObject()) {
- if ([self _accessibilityIsLandmarkRole:parent->roleValue()])
- return parent->wrapper();
- }
-
</del><ins>+ auto matchFunc = [self] (AccessibilityObject* object) {
+ return [self _accessibilityIsLandmarkRole:object->roleValue()];
+ };
+
+ if (AccessibilityObject* parent = matchedParent(m_object, false, matchFunc))
+ return parent->wrapper();
</ins><span class="cx"> return nil;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (AccessibilityObjectWrapper*)_accessibilityTableAncestor
</span><span class="cx"> {
</span><del>- for (AccessibilityObject* parent = m_object->parentObject(); parent != nil; parent = parent->parentObject()) {
- if (parent->roleValue() == TableRole || parent->roleValue() == GridRole)
- return parent->wrapper();
- }
</del><ins>+ auto matchFunc = [] (AccessibilityObject* object) {
+ return object->roleValue() == TableRole || object->roleValue() == GridRole;
+ };
</ins><span class="cx">
</span><ins>+ if (AccessibilityObject* parent = matchedParent(m_object, false, matchFunc))
+ return parent->wrapper();
</ins><span class="cx"> return nil;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (AccessibilityObjectWrapper*)_accessibilityFieldsetAncestor
</span><span class="cx"> {
</span><del>- for (AccessibilityObject* parent = m_object->parentObject(); parent != nil; parent = parent->parentObject()) {
- if (parent->isFieldset())
- return parent->wrapper();
- }
</del><ins>+ auto matchFunc = [] (AccessibilityObject* object) {
+ return object->isFieldset();
+ };
</ins><span class="cx">
</span><ins>+ if (AccessibilityObject* parent = matchedParent(m_object, false, matchFunc))
+ return parent->wrapper();
</ins><span class="cx"> return nil;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1019,27 +1039,25 @@
</span><span class="cx"> - (AccessibilityTableCell*)tableCellParent
</span><span class="cx"> {
</span><span class="cx"> // Find if this element is in a table cell.
</span><del>- AccessibilityObject* cell = nullptr;
- for (cell = m_object; cell && !cell->isTableCell(); cell = cell->parentObject())
- { }
</del><ins>+ auto matchFunc = [] (AccessibilityObject* object) {
+ return object->isTableCell();
+ };
</ins><span class="cx">
</span><del>- if (!cell)
- return nil;
-
- return static_cast<AccessibilityTableCell*>(cell);
</del><ins>+ if (AccessibilityObject* parent = matchedParent(m_object, true, matchFunc))
+ return static_cast<AccessibilityTableCell*>(parent);
+ return nil;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (AccessibilityTable*)tableParent
</span><span class="cx"> {
</span><span class="cx"> // Find if the parent table for the table cell.
</span><del>- AccessibilityObject* parentTable = nullptr;
- for (parentTable = m_object; parentTable && !(is<AccessibilityTable>(*parentTable) && downcast<AccessibilityTable>(*parentTable).isExposableThroughAccessibility()); parentTable = parentTable->parentObject())
- { }
</del><ins>+ auto matchFunc = [] (AccessibilityObject* object) {
+ return is<AccessibilityTable>(*object) && downcast<AccessibilityTable>(*object).isExposableThroughAccessibility();
+ };
</ins><span class="cx">
</span><del>- if (!parentTable)
- return nil;
-
- return static_cast<AccessibilityTable*>(parentTable);
</del><ins>+ if (AccessibilityObject* parent = matchedParent(m_object, true, matchFunc))
+ return static_cast<AccessibilityTable*>(parent);
+ return nil;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (id)accessibilityTitleElement
</span><span class="lines">@@ -1405,14 +1423,14 @@
</span><span class="cx"> }
</span><span class="cx"> else {
</span><span class="cx"> // Find the appropriate scroll view to use to convert the contents to the window.
</span><ins>+ auto matchFunc = [] (AccessibilityObject* object) {
+ return is<AccessibilityScrollView>(*object);
+ };
+
</ins><span class="cx"> ScrollView* scrollView = nullptr;
</span><del>- AccessibilityObject* parent = nullptr;
- for (parent = m_object->parentObject(); parent; parent = parent->parentObject()) {
- if (is<AccessibilityScrollView>(*parent)) {
- scrollView = downcast<AccessibilityScrollView>(*parent).scrollView();
- break;
- }
- }
</del><ins>+ AccessibilityObject* parent = matchedParent(m_object, false, matchFunc);
+ if (parent)
+ scrollView = downcast<AccessibilityScrollView>(*parent).scrollView();
</ins><span class="cx">
</span><span class="cx"> IntPoint intPoint = flooredIntPoint(point);
</span><span class="cx"> if (scrollView)
</span><span class="lines">@@ -1459,14 +1477,14 @@
</span><span class="cx">
</span><span class="cx"> } else {
</span><span class="cx"> // Find the appropriate scroll view to use to convert the contents to the window.
</span><ins>+ auto matchFunc = [] (AccessibilityObject* object) {
+ return is<AccessibilityScrollView>(*object);
+ };
+
</ins><span class="cx"> ScrollView* scrollView = nullptr;
</span><del>- AccessibilityObject* parent = nullptr;
- for (parent = m_object->parentObject(); parent; parent = parent->parentObject()) {
- if (is<AccessibilityScrollView>(*parent)) {
- scrollView = downcast<AccessibilityScrollView>(*parent).scrollView();
- break;
- }
- }
</del><ins>+ AccessibilityObject* parent = matchedParent(m_object, false, matchFunc);
+ if (parent)
+ scrollView = downcast<AccessibilityScrollView>(*parent).scrollView();
</ins><span class="cx">
</span><span class="cx"> if (scrollView)
</span><span class="cx"> rect = scrollView->contentsToRootView(rect);
</span><span class="lines">@@ -1830,6 +1848,31 @@
</span><span class="cx"> return m_object->scrollVisibleContentRect();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (AccessibilityObject*)detailParentForSummaryObject:(AccessibilityObject*)object
+{
+ // Use this to check if an object is the child of a summary object.
+ // And return the summary's parent, which is the expandable details object.
+ auto matchFunc = [] (AccessibilityObject* object) {
+ return object->hasTagName(summaryTag);
+ };
+
+ if (AccessibilityObject* summary = matchedParent(object, true, matchFunc))
+ return summary->parentObject();
+ return nil;
+}
+
+- (AccessibilityObject*)detailParentForObject:(AccessibilityObject*)object
+{
+ // Use this to check if an object is inside a details object.
+ auto matchFunc = [] (AccessibilityObject* object) {
+ return object->hasTagName(detailsTag);
+ };
+
+ if (AccessibilityObject* details = matchedParent(object, true, matchFunc))
+ return details;
+ return nil;
+}
+
</ins><span class="cx"> - (void)accessibilityElementDidBecomeFocused
</span><span class="cx"> {
</span><span class="cx"> if (![self _prepareAccessibilityCall])
</span><span class="lines">@@ -1842,6 +1885,9 @@
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> if (object->canSetFocusAttribute()) {
</span><ins>+ // webkit.org/b/162041 Taking focus onto elements inside a details node will cause VO focusing onto random items.
+ if ([self detailParentForObject:object])
+ break;
</ins><span class="cx"> object->setFocused(true);
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -2677,6 +2723,11 @@
</span><span class="cx"> if (![self _prepareAccessibilityCall])
</span><span class="cx"> return NO;
</span><span class="cx">
</span><ins>+ // Since details element is ignored on iOS, we should expose the expanded status on its
+ // summary's accessible children.
+ if (AccessibilityObject* detailParent = [self detailParentForSummaryObject:m_object])
+ return detailParent->supportsExpanded();
+
</ins><span class="cx"> return m_object->supportsExpanded();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2685,6 +2736,11 @@
</span><span class="cx"> if (![self _prepareAccessibilityCall])
</span><span class="cx"> return NO;
</span><span class="cx">
</span><ins>+ // Since details element is ignored on iOS, we should expose the expanded status on its
+ // summary's accessible children.
+ if (AccessibilityObject* detailParent = [self detailParentForSummaryObject:m_object])
+ return detailParent->isExpanded();
+
</ins><span class="cx"> return m_object->isExpanded();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari602branchToolsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Tools/ChangeLog (207916 => 207917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Tools/ChangeLog        2016-10-26 23:17:48 UTC (rev 207916)
+++ branches/safari-602-branch/Tools/ChangeLog        2016-10-26 23:17:52 UTC (rev 207917)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-10-26 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge r206102. rdar://problem/28744106
+
+ 2016-09-19 Nan Wang <n_wang@apple.com>
+
+ AX: Add accessibility support for details element on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=162041
+
+ Reviewed by Chris Fleizach.
+
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+ (AccessibilityUIElement::isExpanded):
+ * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+ (WTR::AccessibilityUIElement::isExpanded):
+
</ins><span class="cx"> 2016-10-20 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r207220. rdar://problem/28811939
</span></span></pre></div>
<a id="branchessafari602branchToolsDumpRenderTreeiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (207916 => 207917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2016-10-26 23:17:48 UTC (rev 207916)
+++ branches/safari-602-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2016-10-26 23:17:52 UTC (rev 207917)
</span><span class="lines">@@ -96,6 +96,7 @@
</span><span class="cx"> - (UIAccessibilityTraits)_axContainedByFieldsetTrait;
</span><span class="cx"> - (id)_accessibilityFieldsetAncestor;
</span><span class="cx"> - (BOOL)_accessibilityHasTouchEventListener;
</span><ins>+- (BOOL)accessibilityIsExpanded;
</ins><span class="cx">
</span><span class="cx"> // TextMarker related
</span><span class="cx"> - (NSArray *)textMarkerRange;
</span><span class="lines">@@ -813,7 +814,7 @@
</span><span class="cx">
</span><span class="cx"> bool AccessibilityUIElement::isExpanded() const
</span><span class="cx"> {
</span><del>- return false;
</del><ins>+ return [m_element accessibilityIsExpanded];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool AccessibilityUIElement::isChecked() const
</span></span></pre></div>
<a id="branchessafari602branchToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (207916 => 207917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2016-10-26 23:17:48 UTC (rev 207916)
+++ branches/safari-602-branch/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2016-10-26 23:17:52 UTC (rev 207917)
</span><span class="lines">@@ -73,6 +73,7 @@
</span><span class="cx"> - (UIAccessibilityTraits)_axContainedByFieldsetTrait;
</span><span class="cx"> - (id)_accessibilityFieldsetAncestor;
</span><span class="cx"> - (BOOL)_accessibilityHasTouchEventListener;
</span><ins>+- (BOOL)accessibilityIsExpanded;
</ins><span class="cx">
</span><span class="cx"> // TextMarker related
</span><span class="cx"> - (NSArray *)textMarkerRange;
</span><span class="lines">@@ -562,7 +563,7 @@
</span><span class="cx">
</span><span class="cx"> bool AccessibilityUIElement::isExpanded() const
</span><span class="cx"> {
</span><del>- return false;
</del><ins>+ return [m_element accessibilityIsExpanded];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool AccessibilityUIElement::isChecked() const
</span></span></pre>
</div>
</div>
</body>
</html>