<!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>[207540] trunk</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/207540">207540</a></dd>
<dt>Author</dt> <dd>n_wang@apple.com</dd>
<dt>Date</dt> <dd>2016-10-19 09:48:41 -0700 (Wed, 19 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: [Mac] Meter element should use AXValueDescription to descrbe the status of the value
https://bugs.webkit.org/show_bug.cgi?id=163610

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed the goodness of the meter value in AXValueDescription.

Test: accessibility/mac/meter-gauge-value-description.html

* English.lproj/Localizable.strings:
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::gaugeRegionValueDescription):
* accessibility/AccessibilityProgressIndicator.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper valueDescriptionForMeter]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* platform/LocalizedStrings.cpp:
(WebCore::AXMeterGaugeRegionOptimumText):
(WebCore::AXMeterGaugeRegionSuboptimalText):
(WebCore::AXMeterGaugeRegionLessGoodText):
* platform/LocalizedStrings.h:

LayoutTests:

* accessibility/mac/meter-gauge-value-description-expected.txt: Added.
* accessibility/mac/meter-gauge-value-description.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="#trunkSourceWebCoreEnglishlprojLocalizablestrings">trunk/Source/WebCore/English.lproj/Localizable.strings</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityProgressIndicatorcpp">trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityProgressIndicatorh">trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformLocalizedStringscpp">trunk/Source/WebCore/platform/LocalizedStrings.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLocalizedStringsh">trunk/Source/WebCore/platform/LocalizedStrings.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilitymacmetergaugevaluedescriptionexpectedtxt">trunk/LayoutTests/accessibility/mac/meter-gauge-value-description-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacmetergaugevaluedescriptionhtml">trunk/LayoutTests/accessibility/mac/meter-gauge-value-description.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207539 => 207540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-19 16:38:42 UTC (rev 207539)
+++ trunk/LayoutTests/ChangeLog        2016-10-19 16:48:41 UTC (rev 207540)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-10-19  Nan Wang  &lt;n_wang@apple.com&gt;
+
+        AX: [Mac] Meter element should use AXValueDescription to descrbe the status of the value
+        https://bugs.webkit.org/show_bug.cgi?id=163610
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/mac/meter-gauge-value-description-expected.txt: Added.
+        * accessibility/mac/meter-gauge-value-description.html: Added.
+
</ins><span class="cx"> 2016-10-19  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Marking WPT html/webappapis/animation-frames/callback-* tests as flaky on mac-wk1.
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacmetergaugevaluedescriptionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/mac/meter-gauge-value-description-expected.txt (0 => 207540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/meter-gauge-value-description-expected.txt                                (rev 0)
+++ trunk/LayoutTests/accessibility/mac/meter-gauge-value-description-expected.txt        2016-10-19 16:48:41 UTC (rev 207540)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+    
+This tests the gauge value description for meter elements.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS meter1.valueDescription is 'AXValueDescription: '
+PASS meter2.valueDescription is 'AXValueDescription: suboptimal value'
+PASS meter3.valueDescription is 'AXValueDescription: optimal value'
+PASS meter4.valueDescription is 'AXValueDescription: critical value'
+PASS meter5.valueDescription is 'AXValueDescription: 50 hours, optimal value'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacmetergaugevaluedescriptionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/mac/meter-gauge-value-description.html (0 => 207540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/meter-gauge-value-description.html                                (rev 0)
+++ trunk/LayoutTests/accessibility/mac/meter-gauge-value-description.html        2016-10-19 16:48:41 UTC (rev 207540)
</span><span class="lines">@@ -0,0 +1,44 @@
</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;meter id=&quot;meter&quot; value=&quot;83.5&quot;&gt;&lt;/meter&gt;
+&lt;meter id=&quot;meter2&quot; value=&quot;5&quot; optimum=&quot;50&quot; min=&quot;0&quot; max=&quot;100&quot; low=&quot;10&quot; high=&quot;80&quot;&gt;&lt;/meter&gt;
+&lt;meter id=&quot;meter3&quot; value=&quot;50&quot; optimum=&quot;50&quot; min=&quot;0&quot; max=&quot;100&quot; low=&quot;10&quot; high=&quot;80&quot;&gt;&lt;/meter&gt;
+&lt;meter id=&quot;meter4&quot; value=&quot;90&quot; optimum=&quot;20&quot; min=&quot;0&quot; max=&quot;100&quot; low=&quot;50&quot; high=&quot;80&quot;&gt;&lt;/meter&gt;
+&lt;meter id=&quot;meter5&quot; value=&quot;50&quot; optimum=&quot;50&quot; min=&quot;0&quot; max=&quot;100&quot; low=&quot;10&quot; high=&quot;80&quot;&gt;50 hours&lt;/meter&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 the gauge value description for meter elements.&quot;);
+
+    if (window.accessibilityController) {
+
+          // Test that we are not exposing the gauge value description if author 
+          // didn't specify low, high or optimum attribute.
+          var meter1 = accessibilityController.accessibleElementById(&quot;meter&quot;);
+          shouldBe(&quot;meter1.valueDescription&quot;, &quot;'AXValueDescription: '&quot;);
+
+          var meter2 = accessibilityController.accessibleElementById(&quot;meter2&quot;);
+          shouldBe(&quot;meter2.valueDescription&quot;, &quot;'AXValueDescription: suboptimal value'&quot;);
+          
+          var meter3 = accessibilityController.accessibleElementById(&quot;meter3&quot;);
+          shouldBe(&quot;meter3.valueDescription&quot;, &quot;'AXValueDescription: optimal value'&quot;);
+          
+          var meter4 = accessibilityController.accessibleElementById(&quot;meter4&quot;);
+          shouldBe(&quot;meter4.valueDescription&quot;, &quot;'AXValueDescription: critical value'&quot;);
+          
+          // Test meter with inner text.
+          var meter5 = accessibilityController.accessibleElementById(&quot;meter5&quot;);
+          shouldBe(&quot;meter5.valueDescription&quot;, &quot;'AXValueDescription: 50 hours, optimal value'&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 (207539 => 207540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-19 16:38:42 UTC (rev 207539)
+++ trunk/Source/WebCore/ChangeLog        2016-10-19 16:48:41 UTC (rev 207540)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2016-10-19  Nan Wang  &lt;n_wang@apple.com&gt;
+
+        AX: [Mac] Meter element should use AXValueDescription to descrbe the status of the value
+        https://bugs.webkit.org/show_bug.cgi?id=163610
+
+        Reviewed by Chris Fleizach.
+
+        Exposed the goodness of the meter value in AXValueDescription.
+
+        Test: accessibility/mac/meter-gauge-value-description.html
+
+        * English.lproj/Localizable.strings:
+        * accessibility/AccessibilityProgressIndicator.cpp:
+        (WebCore::AccessibilityProgressIndicator::gaugeRegionValueDescription):
+        * accessibility/AccessibilityProgressIndicator.h:
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper valueDescriptionForMeter]):
+        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+        * platform/LocalizedStrings.cpp:
+        (WebCore::AXMeterGaugeRegionOptimumText):
+        (WebCore::AXMeterGaugeRegionSuboptimalText):
+        (WebCore::AXMeterGaugeRegionLessGoodText):
+        * platform/LocalizedStrings.h:
+
</ins><span class="cx"> 2016-10-19  Dave Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Parser] Fix named color parsing
</span></span></pre></div>
<a id="trunkSourceWebCoreEnglishlprojLocalizablestrings"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (207539 => 207540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/English.lproj/Localizable.strings        2016-10-19 16:38:42 UTC (rev 207539)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings        2016-10-19 16:48:41 UTC (rev 207540)
</span><span class="lines">@@ -931,6 +931,9 @@
</span><span class="cx"> /* HTTP result code string */
</span><span class="cx"> &quot;length required&quot; = &quot;length required&quot;;
</span><span class="cx"> 
</span><ins>+/* The less good value description for a meter element */
+&quot;less good&quot; = &quot;critical value&quot;;
+
</ins><span class="cx"> /* accessibility role description for link */
</span><span class="cx"> &quot;link&quot; = &quot;link&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -1018,6 +1021,9 @@
</span><span class="cx"> /* accessibility role description for an output element */
</span><span class="cx"> &quot;output&quot; = &quot;output&quot;;
</span><span class="cx"> 
</span><ins>+/* The optimum value description for a meter element */
+&quot;optimum&quot; = &quot;optimal value&quot;;
+
</ins><span class="cx"> /* HTTP result code string */
</span><span class="cx"> &quot;partial content&quot; = &quot;partial content&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -1120,6 +1126,9 @@
</span><span class="cx"> /* accessibility help text for hide closed captions button */
</span><span class="cx"> &quot;stop displaying closed captions&quot; = &quot;stop displaying closed captions&quot;;
</span><span class="cx"> 
</span><ins>+/* The suboptimal value description for a meter element */
+&quot;suboptimal&quot; = &quot;suboptimal value&quot;;
+
</ins><span class="cx"> /* HTTP result code string */
</span><span class="cx"> &quot;success&quot; = &quot;success&quot;;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityProgressIndicatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp (207539 => 207540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp        2016-10-19 16:38:42 UTC (rev 207539)
+++ trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp        2016-10-19 16:48:41 UTC (rev 207540)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include &quot;HTMLMeterElement.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;HTMLProgressElement.h&quot;
</span><ins>+#include &quot;LocalizedStrings.h&quot;
</ins><span class="cx"> #include &quot;RenderMeter.h&quot;
</span><span class="cx"> #include &quot;RenderObject.h&quot;
</span><span class="cx"> #include &quot;RenderProgress.h&quot;
</span><span class="lines">@@ -167,7 +168,33 @@
</span><span class="cx"> 
</span><span class="cx">     return downcast&lt;RenderMeter&gt;(*m_renderer).meterElement();
</span><span class="cx"> }
</span><ins>+
+String AccessibilityProgressIndicator::gaugeRegionValueDescription() const
+{
+#if PLATFORM(COCOA)
+    if (!m_renderer || !m_renderer-&gt;isMeter())
+        return String();
+    
+    // Only expose this when the author has explicitly specified the following attributes.
+    if (!hasAttribute(lowAttr) &amp;&amp; !hasAttribute(highAttr) &amp;&amp; !hasAttribute(optimumAttr))
+        return String();
+    
+    if (HTMLMeterElement* element = meterElement()) {
+        switch (element-&gt;gaugeRegion()) {
+        case HTMLMeterElement::GaugeRegionOptimum:
+            return AXMeterGaugeRegionOptimumText();
+        case HTMLMeterElement::GaugeRegionSuboptimal:
+            return AXMeterGaugeRegionSuboptimalText();
+        case HTMLMeterElement::GaugeRegionEvenLessGood:
+            return AXMeterGaugeRegionLessGoodText();
+        default:
+            break;
+        }
+    }
</ins><span class="cx"> #endif
</span><ins>+    return String();
+}
+#endif
</ins><span class="cx"> 
</span><span class="cx"> Element* AccessibilityProgressIndicator::element() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityProgressIndicatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.h (207539 => 207540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.h        2016-10-19 16:38:42 UTC (rev 207539)
+++ trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.h        2016-10-19 16:48:41 UTC (rev 207540)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx">     static Ref&lt;AccessibilityProgressIndicator&gt; create(RenderProgress*);
</span><span class="cx"> #if ENABLE(METER_ELEMENT)
</span><span class="cx">     static Ref&lt;AccessibilityProgressIndicator&gt; create(RenderMeter*);
</span><ins>+    String gaugeRegionValueDescription() const;
</ins><span class="cx"> #endif
</span><span class="cx">     Element* element() const override;
</span><span class="cx"> 
</span><span class="lines">@@ -65,4 +66,6 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><ins>+SPECIALIZE_TYPE_TRAITS_ACCESSIBILITY(AccessibilityProgressIndicator, isProgressIndicator())
+
</ins><span class="cx"> #endif // AccessibilityProgressIndicator_h
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (207539 => 207540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2016-10-19 16:38:42 UTC (rev 207539)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2016-10-19 16:48:41 UTC (rev 207540)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #import &quot;AccessibilityLabel.h&quot;
</span><span class="cx"> #import &quot;AccessibilityList.h&quot;
</span><span class="cx"> #import &quot;AccessibilityListBox.h&quot;
</span><ins>+#import &quot;AccessibilityProgressIndicator.h&quot;
</ins><span class="cx"> #import &quot;AccessibilityRenderObject.h&quot;
</span><span class="cx"> #import &quot;AccessibilityScrollView.h&quot;
</span><span class="cx"> #import &quot;AccessibilitySpinButton.h&quot;
</span><span class="lines">@@ -76,7 +77,7 @@
</span><span class="cx"> #import &quot;WebCoreSystemInterface.h&quot;
</span><span class="cx"> #import &quot;htmlediting.h&quot;
</span><span class="cx"> #import &lt;wtf/ObjcRuntimeExtras.h&gt;
</span><del>-#if ENABLE(TREE_DEBUGGING)
</del><ins>+#if ENABLE(TREE_DEBUGGING) || ENABLE(METER_ELEMENT)
</ins><span class="cx"> #import &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -2602,6 +2603,29 @@
</span><span class="cx">     return [self remoteAccessibilityParentObject];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (NSString *)valueDescriptionForMeter
+{
+    if (!m_object)
+        return nil;
+    
+    String valueDescription = m_object-&gt;valueDescription();
+#if ENABLE(METER_ELEMENT)
+    if (!is&lt;AccessibilityProgressIndicator&gt;(m_object))
+        return valueDescription;
+    auto &amp;meter = downcast&lt;AccessibilityProgressIndicator&gt;(*m_object);
+    String gaugeRegionValue = meter.gaugeRegionValueDescription();
+    if (!gaugeRegionValue.isEmpty()) {
+        StringBuilder builder;
+        builder.append(valueDescription);
+        if (builder.length())
+            builder.appendLiteral(&quot;, &quot;);
+        builder.append(gaugeRegionValue);
+        return builder.toString();
+    }
+#endif
+    return valueDescription;
+}
+
</ins><span class="cx"> // FIXME: split up this function in a better way.
</span><span class="cx"> // suggestions: Use a hash table that maps attribute names to function calls,
</span><span class="cx"> // or maybe pointers to member functions
</span><span class="lines">@@ -3199,8 +3223,11 @@
</span><span class="cx">         return nil;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    if ([attributeName isEqualToString:NSAccessibilityValueDescriptionAttribute])
</del><ins>+    if ([attributeName isEqualToString:NSAccessibilityValueDescriptionAttribute]) {
+        if (m_object-&gt;isMeter())
+            return [self valueDescriptionForMeter];
</ins><span class="cx">         return m_object-&gt;valueDescription();
</span><ins>+    }
</ins><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="trunkSourceWebCoreplatformLocalizedStringscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (207539 => 207540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.cpp        2016-10-19 16:38:42 UTC (rev 207539)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp        2016-10-19 16:48:41 UTC (rev 207540)
</span><span class="lines">@@ -781,6 +781,22 @@
</span><span class="cx">     return WEB_UI_STRING(&quot;separator&quot;, &quot;accessibility role description for a horizontal rule [&lt;hr&gt;]&quot;);
</span><span class="cx"> }
</span><span class="cx">     
</span><ins>+#if ENABLE(METER_ELEMENT)
+String AXMeterGaugeRegionOptimumText()
+{
+    return WEB_UI_STRING(&quot;optimum&quot;, &quot;The optimum value description for a meter element.&quot;);
+}
+
+String AXMeterGaugeRegionSuboptimalText()
+{
+    return WEB_UI_STRING(&quot;suboptimal&quot;, &quot;The suboptimal value description for a meter element.&quot;);
+}
+
+String AXMeterGaugeRegionLessGoodText()
+{
+    return WEB_UI_STRING(&quot;less good&quot;, &quot;The less good value description for a meter element.&quot;);
+}
+#endif // ENABLE(METER_ELEMENT)
</ins><span class="cx"> #endif // PLATFORM(COCOA)
</span><span class="cx"> 
</span><span class="cx"> String missingPluginText()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (207539 => 207540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.h        2016-10-19 16:38:42 UTC (rev 207539)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h        2016-10-19 16:48:41 UTC (rev 207540)
</span><span class="lines">@@ -196,7 +196,12 @@
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     String AXARIAContentGroupText(const String&amp; ariaType);
</span><span class="cx">     String AXHorizontalRuleDescriptionText();
</span><ins>+#if ENABLE(METER_ELEMENT)
+    String AXMeterGaugeRegionOptimumText();
+    String AXMeterGaugeRegionSuboptimalText();
+    String AXMeterGaugeRegionLessGoodText();
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx">     
</span><span class="cx">     String AXAutoFillCredentialsLabel();
</span><span class="cx">     String AXAutoFillContactsLabel();
</span></span></pre>
</div>
</div>

</body>
</html>