No subject


Tue May 3 15:05:30 PDT 2016


The element with role treeitem missing a label is labeled by its child elements.

Test: accessibility/mac/aria-tree-item-name.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText):

LayoutTests:

* accessibility/mac/aria-tree-item-name-expected.txt: Added.
* accessibility/mac/aria-tree-item-name.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilitymacariatreeitemnameexpectedtxt">trunk/LayoutTests/accessibility/mac/aria-tree-item-name-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacariatreeitemnamehtml">trunk/LayoutTests/accessibility/mac/aria-tree-item-name.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (210604 => 210605)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog	2017-01-12 00:05:20 UTC (rev 210604)
+++ trunk/LayoutTests/ChangeLog	2017-01-12 00:11:00 UTC (rev 210605)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2017-01-11  Nan Wang  &lt;n_wang at apple.com&gt;
+
+        AX: role=treeitem accessible name not spoken to VoiceOver macOS when using string contained inside element
+        https://bugs.webkit.org/show_bug.cgi?id=164950
+        &lt;rdar://problem/29337573&gt;
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/mac/aria-tree-item-name-expected.txt: Added.
+        * accessibility/mac/aria-tree-item-name.html: Added.
+
</ins><span class="cx"> 2017-01-11  Myles C. Maxfield  &lt;mmaxfield at apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ASSERTION FAILED: run-&gt;m_stop &gt; 0 in *WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacariatreeitemnameexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/mac/aria-tree-item-name-expected.txt (0 => 210605)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/aria-tree-item-name-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/mac/aria-tree-item-name-expected.txt	2017-01-12 00:11:00 UTC (rev 210605)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+Release Notes
+Power Search
+Power Search
+item 2
+
+This tests that name calculation is correct for treeitems.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS item0.description is 'AXDescription: Release Notes'
+PASS item1.description is 'AXDescription: item 1'
+PASS item2.description is 'AXDescription: item 2'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacariatreeitemnamehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/mac/aria-tree-item-name.html (0 => 210605)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/aria-tree-item-name.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/mac/aria-tree-item-name.html	2017-01-12 00:11:00 UTC (rev 210605)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body id=&quot;body&quot;&gt;
+
+&lt;ul id=&quot;tree&quot; role=&quot;tree&quot; aria-label=&quot;Help Topics&quot;&gt;
+  &lt;li id=&quot;item0&quot; role=&quot;treeitem&quot; aria-expanded=&quot;true&quot;&gt;Release Notes
+    &lt;ul role=&quot;group&quot;&gt;
+      &lt;li id=&quot;item1&quot; role=&quot;treeitem&quot; aria-label=&quot;item 1&quot;&gt;Power Search&lt;/li&gt;
+      &lt;li id=&quot;item2&quot; role=&quot;treeitem&quot; aria-labelledby=&quot;label&quot;&gt;Power Search&lt;/li&gt;
+    &lt;/ul&gt;
+  &lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;p id=&quot;label&quot;&gt;item 2&lt;/p&gt;
+
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+
+    description(&quot;This tests that name calculation is correct for treeitems.&quot;);
+
+    if (window.accessibilityController) {
+    
+          // Treeitems missing a label are labeled by child elements.
+          var item0 = accessibilityController.accessibleElementById(&quot;item0&quot;);
+          shouldBe(&quot;item0.description&quot;, &quot;'AXDescription: Release Notes'&quot;);
+          
+          // aria-label case.
+          var item1 = accessibilityController.accessibleElementById(&quot;item1&quot;);
+          shouldBe(&quot;item1.description&quot;, &quot;'AXDescription: item 1'&quot;);
+          
+          // aria-labelledby case.
+          var item2 = accessibilityController.accessibleElementById(&quot;item2&quot;);
+          shouldBe(&quot;item2.description&quot;, &quot;'AXDescription: item 2'&quot;);
+    }
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210604 => 210605)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog	2017-01-12 00:05:20 UTC (rev 210604)
+++ trunk/Source/WebCore/ChangeLog	2017-01-12 00:11:00 UTC (rev 210605)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2017-01-11  Nan Wang  &lt;n_wang at apple.com&gt;
+
+        AX: role=treeitem accessible name not spoken to VoiceOver macOS when using string contained inside element
+        https://bugs.webkit.org/show_bug.cgi?id=164950
+        &lt;rdar://problem/29337573&gt;
+
+        Reviewed by Chris Fleizach.
+
+        From the spec: https://www.w3.org/TR/wai-aria-practices/#TreeView
+        The element with role treeitem missing a label is labeled by its child elements.
+
+        Test: accessibility/mac/aria-tree-item-name.html
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::alternativeText):
+
</ins><span class="cx"> 2017-01-11  Brent Fulgham  &lt;bfulgham at apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Unreviewed build fix after r210600.
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (210604 => 210605)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2017-01-12 00:05:20 UTC (rev 210604)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2017-01-12 00:11:00 UTC (rev 210605)
</span><span class="lines">@@ -1363,6 +1363,10 @@
</span><span class="cx">             textOrder.append(AccessibilityText(accessibleNameForNode(captionForFigure-&gt;node()), AlternativeText));
</span><span class="cx">     }
</span><span class="cx">     
</span><ins>+    // Tree items missing a label are labeled by all child elements.
+    if (isTreeItem() &amp;&amp; ariaLabel.isEmpty() &amp;&amp; ariaLabeledByAttribute().isEmpty())
+        textOrder.append(AccessibilityText(accessibleNameForNode(node), AlternativeText));
+    
</ins><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx">     if (node-&gt;isMathMLElement())
</span><span class="cx">         textOrder.append(AccessibilityText(getAttribute(MathMLNames::alttextAttr), AlternativeText));
</span></span></pre>
</div>
</div>

</body>
</html>


More information about the webkit-changes mailing list