<!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>[204708] releases/WebKitGTK/webkit-2.12</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/204708">204708</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-08-22 06:33:00 -0700 (Mon, 22 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/201087">r201087</a> - [GTK] accessibility/meter-element.html is failing
https://bugs.webkit.org/show_bug.cgi?id=115633

Patch by Joanmarie Diggs &lt;jdiggs@igalia.com&gt; on 2016-05-25

Source/WebCore:

The meter's value description should be exposed in the same fashion
as (we should have been exposing) aria-valuetext, namely through the
&quot;valuetext&quot; AtkObject attribute. This exposure is now in place. Also
implement AccessibilityProgressIndicator::valueDescription() so that
the ports do not have to special-case meter in the platform wrappers.
Map the meter element to the correct role (ATK_ROLE_LEVEL_BAR), and
ignore a previously-included accessible object resulting from the
use of the title attribute on a meter. Finally, do not expose the
meter's title as the accessible name because the HTML spec suggests
authors can supply the numeric unit as the value of title.

No new test file as the failure was identified by meter-element.html.
Seven new test cases were added for additional coverage. Also updated
the ATK expectations for spinbutton-value.html to reflect that we are now
exposing the value of aria-valuetext.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::helpText):
(WebCore::AccessibilityNodeObject::accessibilityDescriptionForChildren):
(WebCore::AccessibilityNodeObject::visibleText):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::valueDescription):
* accessibility/AccessibilityProgressIndicator.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
(atkRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools:

Implement AccessibilityUIElement::valueDescription() and add mapping
from ATK_ROLE_LEVEL_BAR to AXProgressIndicator.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::valueDescription):

LayoutTests:

Seven new test cases were added to meter-element.html for additional
coverage. Also updated the ATK expectations for spinbutton-value.html
to reflect that we are now exposing the value of aria-valuetext.

* accessibility/meter-element.html: New test cases added.
* platform/gtk/TestExpectations: Unskip the previously-failing test.
* platform/gtk/accessibility/meter-element-expected.txt: Updated.
* platform/gtk/accessibility/spinbutton-value-expected.txt: Updated.
* platform/mac/accessibility/meter-element-expected.txt: Updated.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsaccessibilitymeterelementhtml">releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/meter-element.html</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsplatformgtkTestExpectations">releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsplatformgtkaccessibilitymeterelementexpectedtxt">releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/meter-element-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsplatformgtkaccessibilityspinbuttonvalueexpectedtxt">releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/spinbutton-value-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsplatformmacaccessibilitymeterelementexpectedtxt">releases/WebKitGTK/webkit-2.12/LayoutTests/platform/mac/accessibility/meter-element-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityNodeObjectcpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityNodeObject.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityNodeObjecth">releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityNodeObject.h</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityProgressIndicatorcpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityProgressIndicatorh">releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityProgressIndicator.h</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityRenderObjectcpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoreaccessibilityatkWebKitAccessibleWrapperAtkcpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</a></li>
<li><a href="#releasesWebKitGTKwebkit212ToolsChangeLog">releases/WebKitGTK/webkit-2.12/Tools/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit212ToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp">releases/WebKitGTK/webkit-2.12/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit212LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -1,5 +1,22 @@
</span><span class="cx"> 2016-05-25  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
</span><span class="cx"> 
</span><ins>+        [GTK] accessibility/meter-element.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=115633
+
+        Unreviewed.
+
+        Seven new test cases were added to meter-element.html for additional
+        coverage. Also updated the ATK expectations for spinbutton-value.html
+        to reflect that we are now exposing the value of aria-valuetext.
+
+        * accessibility/meter-element.html: New test cases added.
+        * platform/gtk/TestExpectations: Unskip the previously-failing test.
+        * platform/gtk/accessibility/meter-element-expected.txt: Updated.
+        * platform/gtk/accessibility/spinbutton-value-expected.txt: Updated.
+        * platform/mac/accessibility/meter-element-expected.txt: Updated.
+
+2016-05-25  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
+
</ins><span class="cx">         AX: Layout tests related to text alternative computation need to be done differently
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=157187
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsaccessibilitymeterelementhtml"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/meter-element.html (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/meter-element.html        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/meter-element.html        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -11,6 +11,16 @@
</span><span class="cx"> &lt;meter id=&quot;meter5&quot; min=0 max=10 value=2&gt;2cm&lt;/meter&gt;
</span><span class="cx"> &lt;meter id=&quot;meter6&quot; min=0 max=20 value=12 title=&quot;centimeters&quot;&gt;12cm&lt;/meter&gt;
</span><span class="cx"> &lt;meter id=&quot;meter7&quot; min=0 max=10 value=2 title=&quot;centimeters&quot;&gt;2cm&lt;/meter&gt;
</span><ins>+&lt;meter id=&quot;meter8&quot; value=0.75&gt;&lt;img aria-label=&quot;75 out of 100&quot; src=&quot;graph75.png&quot;&gt;&lt;/meter&gt;
+&lt;meter id=&quot;meter9&quot; value=0.75&gt;&lt;img aria-label=&quot;75 out of 100&quot; aria-labelledby=&quot;label&quot; src=&quot;graph75.png&quot;&gt;&lt;/meter&gt;
+&lt;meter id=&quot;meter10&quot; value=0.75&gt;&lt;img aria-labelledby=&quot;label&quot; src=&quot;graph75.png&quot;&gt;&lt;/meter&gt;
+&lt;span id=&quot;label&quot; style=&quot;color:green;&quot;&gt;75 percent&lt;/span&gt;
+&lt;meter id=&quot;meter11&quot; value=0.75&gt;&lt;img aria-labelledby=&quot;label1 label2&quot; src=&quot;graph75.png&quot;&gt;&lt;/meter&gt;
+&lt;span id=&quot;label1&quot; style=&quot;color:green;&quot;&gt;75&lt;/span&gt;
+&lt;span id=&quot;label2&quot; style=&quot;color:green;&quot;&gt;(100 total)&lt;/span&gt;
+&lt;meter id=&quot;meter12&quot; value=0.75&gt;&lt;span style=&quot;color:green;&quot;&gt;75 (out of 100 total)&lt;/span&gt;&lt;/meter&gt;
+&lt;meter id=&quot;meter13&quot; value=0.75&gt;&lt;div&gt;&lt;p&gt;&lt;span style=&quot;color:green;&quot;&gt;75 (out of 100 total)&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/meter&gt;
+&lt;meter id=&quot;meter14&quot; value=0.60&gt;&lt;div aria-label=&quot;7 of 10&quot;&gt;&lt;span style=&quot;color:green;&quot;&gt;&amp;#9632;&amp;#9632;&amp;#9632;&amp;#9632;&amp;#9632;&amp;#9632;&lt;/span&gt;&lt;span&gt;&amp;#9633;&amp;#9633;&amp;#9633;&amp;#9633;&lt;/span&gt;&lt;/div&gt;&lt;/meter&gt;
</ins><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -19,7 +29,7 @@
</span><span class="cx"> description(&quot;This tests that the meter element is accessible.&quot;);
</span><span class="cx"> 
</span><span class="cx"> if (window.testRunner &amp;&amp; window.accessibilityController) {
</span><del>-    for (var k = 1; k &lt; 8; k++) {
</del><ins>+    for (var k = 1; k &lt; 15; k++) {
</ins><span class="cx">         var meter = accessibilityController.accessibleElementById(&quot;meter&quot; + k);
</span><span class="cx">         debug(&quot;Meter&quot; + k);
</span><span class="cx">         debug(meter.role);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/TestExpectations (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/TestExpectations        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/TestExpectations        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -2036,8 +2036,6 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/115437 fast/text/complex-initial-advance.html [ ImageOnlyFailure ]
</span><span class="cx"> 
</span><del>-webkit.org/b/115633 accessibility/meter-element.html [ Failure ]
-
</del><span class="cx"> webkit.org/b/116153 fast/css/text-overflow-ellipsis-full-truncate-rtl.html [ ImageOnlyFailure ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/116806 fast/css/text-overflow-ellipsis-behind-floats.html [ ImageOnlyFailure ]
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsplatformgtkaccessibilitymeterelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/meter-element-expected.txt (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/meter-element-expected.txt        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/meter-element-expected.txt        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><del>-CONSOLE MESSAGE: line 25: TypeError: undefined is not an object (evaluating 'meter.role')
-      
</del><span class="cx"> This tests that the meter element is accessible.
</span><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="lines">@@ -6,7 +4,118 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> Meter1
</span><del>-FAIL successfullyParsed should be true (of type boolean). Was undefined (of type undefined).
</del><ins>+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 6 blocks used (out of 8 total)
+AXValueSettable: false
</ins><span class="cx"> 
</span><ins>+
+Meter2
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75%
+AXValueSettable: false
+
+
+Meter3
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 
+AXValueSettable: false
+
+
+Meter4
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 12cm
+AXValueSettable: false
+
+
+Meter5
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 2cm
+AXValueSettable: false
+
+
+Meter6
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: centimeters
+AXValueDescription: 12cm
+AXValueSettable: false
+
+
+Meter7
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: centimeters
+AXValueDescription: 2cm
+AXValueSettable: false
+
+
+Meter8
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 out of 100
+AXValueSettable: false
+
+
+Meter9
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 percent
+AXValueSettable: false
+
+
+Meter10
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 percent
+AXValueSettable: false
+
+
+Meter11
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 (100 total)
+AXValueSettable: false
+
+
+Meter12
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 (out of 100 total)
+AXValueSettable: false
+
+
+Meter13
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 (out of 100 total)
+AXValueSettable: false
+
+
+Meter14
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 7 of 10
+AXValueSettable: false
+
+
+PASS successfullyParsed is true
+
</ins><span class="cx"> TEST COMPLETE
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsplatformgtkaccessibilityspinbuttonvalueexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/spinbutton-value-expected.txt (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/spinbutton-value-expected.txt        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/spinbutton-value-expected.txt        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS endsWith(axSpin.intValue, '5') is true
</span><span class="cx"> PASS endsWith(axSpin.minValue, '1') is true
</span><span class="cx"> PASS endsWith(axSpin.maxValue, '9') is true
</span><del>-FAIL endsWith(axSpin.valueDescription, '5 of 9') should be true. Was false.
</del><ins>+PASS endsWith(axSpin.valueDescription, '5 of 9') is true
</ins><span class="cx"> PASS axSpin.title is axUntitled.title
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsplatformmacaccessibilitymeterelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/mac/accessibility/meter-element-expected.txt (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/platform/mac/accessibility/meter-element-expected.txt        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/platform/mac/accessibility/meter-element-expected.txt        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -59,6 +59,62 @@
</span><span class="cx"> AXValueSettable: false
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+Meter8
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 out of 100
+AXValueSettable: false
+
+
+Meter9
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 percent
+AXValueSettable: false
+
+
+Meter10
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 percent
+AXValueSettable: false
+
+
+Meter11
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 (100 total)
+AXValueSettable: false
+
+
+Meter12
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 (out of 100 total)
+AXValueSettable: false
+
+
+Meter13
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 75 (out of 100 total)
+AXValueSettable: false
+
+
+Meter14
+AXRole: AXProgressIndicator
+AXTitle: 
+AXDescription: 
+AXValueDescription: 7 of 10
+AXValueSettable: false
+
+
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -1,5 +1,44 @@
</span><span class="cx"> 2016-05-25  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
</span><span class="cx"> 
</span><ins>+        [GTK] accessibility/meter-element.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=115633
+
+        Unreviewed.
+
+        The meter's value description should be exposed in the same fashion
+        as (we should have been exposing) aria-valuetext, namely through the
+        &quot;valuetext&quot; AtkObject attribute. This exposure is now in place. Also
+        implement AccessibilityProgressIndicator::valueDescription() so that
+        the ports do not have to special-case meter in the platform wrappers.
+        Map the meter element to the correct role (ATK_ROLE_LEVEL_BAR), and
+        ignore a previously-included accessible object resulting from the
+        use of the title attribute on a meter. Finally, do not expose the
+        meter's title as the accessible name because the HTML spec suggests
+        authors can supply the numeric unit as the value of title.
+
+        No new test file as the failure was identified by meter-element.html.
+        Seven new test cases were added for additional coverage. Also updated
+        the ATK expectations for spinbutton-value.html to reflect that we are now
+        exposing the value of aria-valuetext.
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::helpText):
+        (WebCore::AccessibilityNodeObject::accessibilityDescriptionForChildren):
+        (WebCore::AccessibilityNodeObject::visibleText):
+        * accessibility/AccessibilityNodeObject.h:
+        * accessibility/AccessibilityProgressIndicator.cpp:
+        (WebCore::AccessibilityProgressIndicator::valueDescription):
+        * accessibility/AccessibilityProgressIndicator.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (webkitAccessibleGetAttributes):
+        (atkRole):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+
+2016-05-25  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
+
</ins><span class="cx">         AX: [ATK] Use WebCore Accessibility's AccessibilityText for AtkObject name and description
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=157822
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityNodeObjectcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -1354,7 +1354,6 @@
</span><span class="cx">     case RadioButtonRole:
</span><span class="cx">     case SwitchRole:
</span><span class="cx">     case TabRole:
</span><del>-    case ProgressIndicatorRole:
</del><span class="cx">         useTextUnderElement = true;
</span><span class="cx">         break;
</span><span class="cx">     default:
</span><span class="lines">@@ -1395,9 +1394,17 @@
</span><span class="cx">         textOrder.append(AccessibilityText(summary, SummaryText));
</span><span class="cx"> 
</span><span class="cx">     // The title attribute should be used as help text unless it is already being used as descriptive text.
</span><ins>+    // However, when the title attribute is the only text alternative provided, it may be exposed as the
+    // descriptive text. This is problematic in the case of meters because the HTML spec suggests authors
+    // can expose units through this attribute. Therefore, if the element is a meter, change its source
+    // type to HelpText.
</ins><span class="cx">     const AtomicString&amp; title = getAttribute(titleAttr);
</span><del>-    if (!title.isEmpty())
-        textOrder.append(AccessibilityText(title, TitleTagText));
</del><ins>+    if (!title.isEmpty()) {
+        if (!isMeter())
+            textOrder.append(AccessibilityText(title, TitleTagText));
+        else
+            textOrder.append(AccessibilityText(title, HelpText));
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AccessibilityNodeObject::accessibilityText(Vector&lt;AccessibilityText&gt;&amp; textOrder)
</span><span class="lines">@@ -1893,6 +1900,32 @@
</span><span class="cx">     return String();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String AccessibilityNodeObject::accessibilityDescriptionForChildren() const
+{
+    Node* node = this-&gt;node();
+    if (!node)
+        return String();
+
+    AXObjectCache* cache = axObjectCache();
+    if (!cache)
+        return String();
+
+    StringBuilder builder;
+    for (Node* child = node-&gt;firstChild(); child; child = child-&gt;nextSibling()) {
+        if (!is&lt;Element&gt;(child))
+            continue;
+
+        if (AccessibilityObject* axObject = cache-&gt;getOrCreate(child)) {
+            String description = axObject-&gt;ariaLabeledByAttribute();
+            if (description.isEmpty())
+                description = accessibleNameForNode(child);
+            appendNameToStringBuilder(builder, description);
+        }
+    }
+
+    return builder.toString();
+}
+
</ins><span class="cx"> String AccessibilityNodeObject::accessibilityDescriptionForElements(Vector&lt;Element*&gt; &amp;elements) const
</span><span class="cx"> {
</span><span class="cx">     StringBuilder builder;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityNodeObjecth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityNodeObject.h (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityNodeObject.h        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityNodeObject.h        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -123,6 +123,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual unsigned hierarchicalLevel() const override;
</span><span class="cx">     virtual String textUnderElement(AccessibilityTextUnderElementMode = AccessibilityTextUnderElementMode()) const override;
</span><ins>+    virtual String accessibilityDescriptionForChildren() const;
</ins><span class="cx">     virtual String accessibilityDescription() const override;
</span><span class="cx">     virtual String helpText() const override;
</span><span class="cx">     virtual String title() const override;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityProgressIndicatorcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -21,6 +21,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;AccessibilityProgressIndicator.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;AXObjectCache.h&quot;
</ins><span class="cx"> #include &quot;FloatConversion.h&quot;
</span><span class="cx"> #include &quot;HTMLMeterElement.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="lines">@@ -60,6 +61,36 @@
</span><span class="cx">     return accessibilityIsIgnoredByDefault();
</span><span class="cx"> }
</span><span class="cx">     
</span><ins>+String AccessibilityProgressIndicator::valueDescription() const
+{
+    // If the author has explicitly provided a value through aria-valuetext, use it.
+    String description = AccessibilityRenderObject::valueDescription();
+    if (!description.isEmpty())
+        return description;
+
+#if ENABLE(METER_ELEMENT)
+    if (!m_renderer-&gt;isMeter())
+        return String();
+
+    HTMLMeterElement* meter = meterElement();
+    if (!meter)
+        return String();
+
+    // The HTML spec encourages authors to include a textual representation of the meter's state in
+    // the element's contents. We'll fall back on that if there is not a more accessible alternative.
+    AccessibilityObject* axMeter = axObjectCache()-&gt;getOrCreate(meter);
+    if (is&lt;AccessibilityNodeObject&gt;(axMeter)) {
+        description = downcast&lt;AccessibilityNodeObject&gt;(axMeter)-&gt;accessibilityDescriptionForChildren();
+        if (!description.isEmpty())
+            return description;
+    }
+
+    return meter-&gt;textContent();
+#endif
+
+    return String();
+}
+
</ins><span class="cx"> float AccessibilityProgressIndicator::valueForRange() const
</span><span class="cx"> {
</span><span class="cx">     if (!m_renderer)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityProgressIndicatorh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityProgressIndicator.h (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityProgressIndicator.h        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityProgressIndicator.h        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool isProgressIndicator() const override { return true; }
</span><span class="cx"> 
</span><ins>+    virtual String valueDescription() const override;
</ins><span class="cx">     virtual float valueForRange() const override;
</span><span class="cx">     virtual float maxValueForRange() const override;
</span><span class="cx">     virtual float minValueForRange() const override;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -1366,6 +1366,15 @@
</span><span class="cx">     if (isWebArea())
</span><span class="cx">         return false;
</span><span class="cx">     
</span><ins>+#if ENABLE(METER_ELEMENT)
+    // The render tree of meter includes a RenderBlock (meter) and a RenderMeter (div).
+    // We expose the latter and thus should ignore the former. However, if the author
+    // includes a title attribute on the element, hasAttributesRequiredForInclusion()
+    // will return true, potentially resulting in a redundant accessible object.
+    if (is&lt;HTMLMeterElement&gt;(node))
+        return true;
+#endif
+
</ins><span class="cx">     // Using the presence of an accessible name to decide an element's visibility is not
</span><span class="cx">     // as definitive as previous checks, so this should remain as one of the last.
</span><span class="cx">     if (hasAttributesRequiredForInclusion())
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCoreaccessibilityatkWebKitAccessibleWrapperAtkcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -427,6 +427,10 @@
</span><span class="cx">     if (!isReadOnly.isEmpty())
</span><span class="cx">         attributeSet = addToAtkAttributeSet(attributeSet, &quot;readonly&quot;, isReadOnly.utf8().data());
</span><span class="cx"> 
</span><ins>+    String valueDescription = coreObject-&gt;valueDescription();
+    if (!valueDescription.isEmpty())
+        attributeSet = addToAtkAttributeSet(attributeSet, &quot;valuetext&quot;, valueDescription.utf8().data());
+
</ins><span class="cx">     // According to the W3C Core Accessibility API Mappings 1.1, section 5.4.1 General Rules:
</span><span class="cx">     // &quot;User agents must expose the WAI-ARIA role string if the API supports a mechanism to do so.&quot;
</span><span class="cx">     // In the case of ATK, the mechanism to do so is an object attribute pair (xml-roles:&quot;string&quot;).
</span><span class="lines">@@ -513,8 +517,7 @@
</span><span class="cx">     case BusyIndicatorRole:
</span><span class="cx">         return ATK_ROLE_PROGRESS_BAR; // Is this right?
</span><span class="cx">     case ProgressIndicatorRole:
</span><del>-        // return ATK_ROLE_SPIN_BUTTON; // Some confusion about this role in AccessibilityRenderObject.cpp
-        return ATK_ROLE_PROGRESS_BAR;
</del><ins>+        return coreObject-&gt;isMeter() ? ATK_ROLE_LEVEL_BAR : ATK_ROLE_PROGRESS_BAR;
</ins><span class="cx">     case WindowRole:
</span><span class="cx">         return ATK_ROLE_WINDOW;
</span><span class="cx">     case PopUpButtonRole:
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -3126,12 +3126,8 @@
</span><span class="cx">         return nil;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    if ([attributeName isEqualToString:NSAccessibilityValueDescriptionAttribute]) {
-        if (m_object-&gt;isMeter())
-            return [self baseAccessibilityTitle];
-        
</del><ins>+    if ([attributeName isEqualToString:NSAccessibilityValueDescriptionAttribute])
</ins><span class="cx">         return m_object-&gt;valueDescription();
</span><del>-    }
</del><span class="cx">     
</span><span class="cx">     if ([attributeName isEqualToString:NSAccessibilityOrientationAttribute]) {
</span><span class="cx">         AccessibilityOrientation elementOrientation = m_object-&gt;orientation();
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212ToolsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Tools/ChangeLog (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Tools/ChangeLog        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/Tools/ChangeLog        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -1,5 +1,18 @@
</span><span class="cx"> 2016-05-25  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
</span><span class="cx"> 
</span><ins>+        [GTK] accessibility/meter-element.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=115633
+
+        Unreviewed.
+
+        Implement AccessibilityUIElement::valueDescription() and add mapping
+        from ATK_ROLE_LEVEL_BAR to AXProgressIndicator.
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::valueDescription):
+
+2016-05-25  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
+
</ins><span class="cx">         AX: [ATK] Use WebCore Accessibility's AccessibilityText for AtkObject name and description
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=157822
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212ToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (204707 => 204708)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2016-08-22 13:04:05 UTC (rev 204707)
+++ releases/WebKitGTK/webkit-2.12/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2016-08-22 13:33:00 UTC (rev 204708)
</span><span class="lines">@@ -379,6 +379,8 @@
</span><span class="cx">         return &quot;AXInvalid&quot;;
</span><span class="cx">     case ATK_ROLE_LABEL:
</span><span class="cx">         return &quot;AXLabel&quot;;
</span><ins>+    case ATK_ROLE_LEVEL_BAR:
+        return &quot;AXProgressIndicator&quot;;
</ins><span class="cx">     case ATK_ROLE_LINK:
</span><span class="cx">         return &quot;AXLink&quot;;
</span><span class="cx">     case ATK_ROLE_LIST:
</span><span class="lines">@@ -1400,8 +1402,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::valueDescription()
</span><span class="cx"> {
</span><del>-    // FIXME: implement
-    return JSStringCreateWithCharacters(0, 0);
</del><ins>+    String valueText = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), ObjectAttributeType, &quot;valuetext&quot;);
+    GUniquePtr&lt;gchar&gt; valueDescription(g_strdup_printf(&quot;AXValueDescription: %s&quot;, valueText.utf8().data()));
+    return JSStringCreateWithUTF8CString(valueDescription.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int AccessibilityUIElement::insertionPointLineNumber()
</span></span></pre>
</div>
</div>

</body>
</html>