<!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>[206943] 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/206943">206943</a></dd>
<dt>Author</dt> <dd>n_wang@apple.com</dd>
<dt>Date</dt> <dd>2016-10-07 16:30:16 -0700 (Fri, 07 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: &lt;figcaption&gt; should be AXTitleUIElement for other content inside the &lt;figure&gt;
https://bugs.webkit.org/show_bug.cgi?id=108996

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed the figcaption element to be the AXTitleUIElement for the figure element. And used
the figcaption's content as the accessible name of the figure. Also, updated the figure element's
role description on Mac.
Accessible name and description calculation for figure elements:
https://w3c.github.io/html-aam/#figure-and-figcaption-elements

Test: accessibility/mac/figure-element.html

* English.lproj/Localizable.strings:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::captionForFigure):
(WebCore::AccessibilityNodeObject::alternativeText):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isFigure):
(WebCore::AccessibilityObject::isSuperscriptStyleGroup): Deleted.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::exposesTitleUIElement):
(WebCore::AccessibilityRenderObject::titleUIElement):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper roleDescription]):
* platform/LocalizedStrings.cpp:
(WebCore::AXFigureText):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXFigureText):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXFigureText):

LayoutTests:

* accessibility/mac/figure-element-expected.txt: Added.
* accessibility/mac/figure-element.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="#trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityNodeObjecth">trunk/Source/WebCore/accessibility/AccessibilityNodeObject.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjecth">trunk/Source/WebCore/accessibility/AccessibilityObject.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</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>
<li><a href="#trunkSourceWebCoreplatformeflLocalizedStringsEflcpp">trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgtkLocalizedStringsGtkcpp">trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilitymacfigureelementexpectedtxt">trunk/LayoutTests/accessibility/mac/figure-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacfigureelementhtml">trunk/LayoutTests/accessibility/mac/figure-element.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/LayoutTests/ChangeLog        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-10-07  Nan Wang  &lt;n_wang@apple.com&gt;
+
+        AX: &lt;figcaption&gt; should be AXTitleUIElement for other content inside the &lt;figure&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=108996
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/mac/figure-element-expected.txt: Added.
+        * accessibility/mac/figure-element.html: Added.
+
</ins><span class="cx"> 2016-10-07  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Marking inspector/debugger/stepping tests as flaky.
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacfigureelementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/mac/figure-element-expected.txt (0 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/figure-element-expected.txt                                (rev 0)
+++ trunk/LayoutTests/accessibility/mac/figure-element-expected.txt        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+This tests that the 'figure' element is accessible on the Mac.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Test figure with aria-label.
+figure1 role: AXRole: AXGroup
+figure1 roleDescription: AXRoleDescription: figure
+figure1 description: AXDescription: aria-label attribute
+figure1 helpText: AXHelp: 
+PASS !titleUIElement is true
+
+Test figure with title attribute.
+figure2 role: AXRole: AXGroup
+figure2 roleDescription: AXRoleDescription: figure
+figure2 description: AXDescription: title attribute
+figure2 helpText: AXHelp: 
+PASS !titleUIElement is true
+
+Test figure with aria-describedby.
+figure3 role: AXRole: AXGroup
+figure3 roleDescription: AXRoleDescription: figure
+figure3 description: AXDescription: 
+figure3 helpText: AXHelp: p referenced by aria-describedby
+PASS !titleUIElement is true
+
+Test figure with figcaption element.
+figure4 role: AXRole: AXGroup
+figure4 roleDescription: AXRoleDescription: figure
+figure4 description: AXDescription: Figcaption element
+figure4 helpText: AXHelp: 
+PASS titleUIElement.isEqual(figureCaption) is true
+
+Test figure with figcaption element and title attribute.
+figure5 role: AXRole: AXGroup
+figure5 roleDescription: AXRoleDescription: figure
+figure5 description: AXDescription: Figcaption element
+figure5 helpText: AXHelp: title attribute
+PASS titleUIElement.isEqual(figureCaption) is true
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacfigureelementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/mac/figure-element.html (0 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/figure-element.html                                (rev 0)
+++ trunk/LayoutTests/accessibility/mac/figure-element.html        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -0,0 +1,72 @@
</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;div id=&quot;content&quot;&gt;
+
+&lt;p id=&quot;p1&quot;&gt;Test figure with aria-label.&lt;/p&gt;
+&lt;figure id=&quot;figure1&quot; aria-label=&quot;aria-label attribute&quot;&gt;
+        &lt;img src=&quot;&quot; alt=&quot;image alt&quot; width=&quot;20&quot; height=&quot;20&quot;/&gt;
+&lt;/figure&gt;
+
+&lt;p id=&quot;p2&quot;&gt;Test figure with title attribute.&lt;/p&gt;
+&lt;figure id=&quot;figure2&quot; title=&quot;title attribute&quot;&gt;
+        &lt;img src=&quot;&quot; alt=&quot;image alt&quot; width=&quot;20&quot; height=&quot;20&quot;/&gt;
+&lt;/figure&gt;
+
+&lt;p id=&quot;p3&quot;&gt;Test figure with aria-describedby.&lt;/p&gt;
+&lt;figure id=&quot;figure3&quot; aria-describedby=&quot;fg-describedby&quot;&gt;
+        &lt;img src=&quot;&quot; alt=&quot;image alt&quot; width=&quot;20&quot; height=&quot;20&quot;/&gt;
+        &lt;p id=&quot;fg-describedby&quot;&gt;p referenced by aria-describedby&lt;/p&gt;
+&lt;/figure&gt;
+
+&lt;p id=&quot;p4&quot;&gt;Test figure with figcaption element.&lt;/p&gt;
+&lt;figure id=&quot;figure4&quot;&gt;
+        &lt;img src=&quot;&quot; alt=&quot;image alt&quot; width=&quot;20&quot; height=&quot;20&quot;/&gt;
+        &lt;figcaption id=&quot;figCaption4&quot;&gt;Figcaption element&lt;/figcaption&gt;
+&lt;/figure&gt;
+
+&lt;p id=&quot;p5&quot;&gt;Test figure with figcaption element and title attribute.&lt;/p&gt;
+&lt;figure id=&quot;figure5&quot; title=&quot;title attribute&quot;&gt;
+        &lt;img src=&quot;&quot; alt=&quot;image alt&quot; width=&quot;20&quot; height=&quot;20&quot;/&gt;
+        &lt;figcaption id=&quot;figCaption5&quot;&gt;Figcaption element&lt;/figcaption&gt;
+&lt;/figure&gt;
+
+&lt;/div&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 the 'figure' element is accessible on the Mac.&quot;);
+
+    if (window.accessibilityController) {
+
+        for (var k = 1; k &lt;= 5; k++) {
+           var figure = accessibilityController.accessibleElementById(&quot;figure&quot; + k);
+           var p = document.getElementById(&quot;p&quot; + k);
+           debug(p.innerText);
+           debug(&quot;figure&quot; + k + &quot; role: &quot; + figure.role);
+           debug(&quot;figure&quot; + k + &quot; roleDescription: &quot; + figure.roleDescription);
+           debug(&quot;figure&quot; + k + &quot; description: &quot; + figure.description);
+           debug(&quot;figure&quot; + k + &quot; helpText: &quot; + figure.helpText);
+           var titleUIElement = figure.titleUIElement();
+           if (k &gt;= 4) {
+               var figureCaption = accessibilityController.accessibleElementById(&quot;figCaption&quot; + k);
+               shouldBeTrue(&quot;titleUIElement.isEqual(figureCaption)&quot;);
+           } else
+               shouldBeTrue(&quot;!titleUIElement&quot;);
+           debug(&quot;&quot;);
+        }
+        document.getElementById(&quot;content&quot;).innerText = &quot;&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 (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/ChangeLog        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2016-10-07  Nan Wang  &lt;n_wang@apple.com&gt;
+
+        AX: &lt;figcaption&gt; should be AXTitleUIElement for other content inside the &lt;figure&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=108996
+
+        Reviewed by Chris Fleizach.
+
+        Exposed the figcaption element to be the AXTitleUIElement for the figure element. And used
+        the figcaption's content as the accessible name of the figure. Also, updated the figure element's
+        role description on Mac.
+        Accessible name and description calculation for figure elements: 
+        https://w3c.github.io/html-aam/#figure-and-figcaption-elements
+
+        Test: accessibility/mac/figure-element.html
+
+        * English.lproj/Localizable.strings:
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::captionForFigure):
+        (WebCore::AccessibilityNodeObject::alternativeText):
+        * accessibility/AccessibilityNodeObject.h:
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::isFigure):
+        (WebCore::AccessibilityObject::isSuperscriptStyleGroup): Deleted.
+        * accessibility/AccessibilityObject.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::exposesTitleUIElement):
+        (WebCore::AccessibilityRenderObject::titleUIElement):
+        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper roleDescription]):
+        * platform/LocalizedStrings.cpp:
+        (WebCore::AXFigureText):
+        * platform/LocalizedStrings.h:
+        * platform/efl/LocalizedStringsEfl.cpp:
+        (WebCore::AXFigureText):
+        * platform/gtk/LocalizedStringsGtk.cpp:
+        (WebCore::AXFigureText):
+
</ins><span class="cx"> 2016-10-07  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Non-special URL fragments should percent-encode non-ASCII characters
</span></span></pre></div>
<a id="trunkSourceWebCoreEnglishlprojLocalizablestrings"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/English.lproj/Localizable.strings        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -259,6 +259,9 @@
</span><span class="cx"> /* menu item */
</span><span class="cx"> &quot;Exit Picture in Picture&quot; = &quot;Exit Picture in Picture&quot;;
</span><span class="cx"> 
</span><ins>+/* accessibility role description for a figure element */
+&quot;figure&quot; = &quot;figure&quot;;
+
</ins><span class="cx"> /* Default application name for Open With context menu */
</span><span class="cx"> &quot;Finder&quot; = &quot;Finder&quot;;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -1226,6 +1226,23 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+AccessibilityObject* AccessibilityNodeObject::captionForFigure() const
+{
+    if (!isFigure())
+        return nullptr;
+    
+    AXObjectCache* cache = axObjectCache();
+    if (!cache)
+        return nullptr;
+    
+    Node* node = this-&gt;node();
+    for (Node* child = node-&gt;firstChild(); child; child = child-&gt;nextSibling()) {
+        if (child-&gt;hasTagName(figcaptionTag))
+            return cache-&gt;getOrCreate(child);
+    }
+    return nullptr;
+}
+
</ins><span class="cx"> bool AccessibilityNodeObject::usesAltTagForTextComputation() const
</span><span class="cx"> {
</span><span class="cx">     return isImage() || isInputImage() || isNativeImage() || isCanvas() || (node() &amp;&amp; node()-&gt;hasTagName(imgTag));
</span><span class="lines">@@ -1324,6 +1341,13 @@
</span><span class="cx">             textOrder.append(AccessibilityText(accessibleNameForNode(object-&gt;node()), AlternativeText));
</span><span class="cx">     }
</span><span class="cx">     
</span><ins>+    // The figure element derives its alternative text from the first associated figcaption element if one is available.
+    if (isFigure()) {
+        AccessibilityObject* captionForFigure = this-&gt;captionForFigure();
+        if (captionForFigure &amp;&amp; !captionForFigure-&gt;isHidden())
+            textOrder.append(AccessibilityText(accessibleNameForNode(captionForFigure-&gt;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>
<a id="trunkSourceWebCoreaccessibilityAccessibilityNodeObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.h (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.h        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.h        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -195,6 +195,7 @@
</span><span class="cx">     Element* menuElementForMenuButton() const;
</span><span class="cx">     Element* menuItemElementForMenu() const;
</span><span class="cx">     AccessibilityObject* menuButtonForMenu() const;
</span><ins>+    AccessibilityObject* captionForFigure() const;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     bool isAccessibilityNodeObject() const final { return true; }
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -3088,6 +3088,12 @@
</span><span class="cx">     Node* node = this-&gt;node();
</span><span class="cx">     return node &amp;&amp; node-&gt;hasTagName(supTag);
</span><span class="cx"> }
</span><ins>+
+bool AccessibilityObject::isFigure() const
+{
+    Node* node = this-&gt;node();
+    return node &amp;&amp; node-&gt;hasTagName(figureTag);
+}
</ins><span class="cx">     
</span><span class="cx"> bool AccessibilityObject::isContainedByPasswordField() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.h        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -560,6 +560,7 @@
</span><span class="cx">     bool isStyleFormatGroup() const;
</span><span class="cx">     bool isSubscriptStyleGroup() const;
</span><span class="cx">     bool isSuperscriptStyleGroup() const;
</span><ins>+    bool isFigure() const;
</ins><span class="cx">     
</span><span class="cx">     virtual bool isChecked() const { return false; }
</span><span class="cx">     virtual bool isEnabled() const { return false; }
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -1045,7 +1045,7 @@
</span><span class="cx">     
</span><span class="cx"> bool AccessibilityRenderObject::exposesTitleUIElement() const
</span><span class="cx"> {
</span><del>-    if (!isControl())
</del><ins>+    if (!isControl() &amp;&amp; !isFigure())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     // If this control is ignored (because it's invisible), 
</span><span class="lines">@@ -1082,6 +1082,9 @@
</span><span class="cx">     if (isFieldset())
</span><span class="cx">         return axObjectCache()-&gt;getOrCreate(downcast&lt;RenderFieldset&gt;(*m_renderer).findLegend(RenderFieldset::IncludeFloatingOrOutOfFlow));
</span><span class="cx">     
</span><ins>+    if (isFigure())
+        return captionForFigure();
+    
</ins><span class="cx">     Node* node = m_renderer-&gt;node();
</span><span class="cx">     if (!is&lt;Element&gt;(node))
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -1245,6 +1248,9 @@
</span><span class="cx">     // all controls are accessible
</span><span class="cx">     if (isControl())
</span><span class="cx">         return false;
</span><ins>+    
+    if (isFigure())
+        return false;
</ins><span class="cx"> 
</span><span class="cx">     switch (roleValue()) {
</span><span class="cx">     case AudioRole:
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -2478,6 +2478,9 @@
</span><span class="cx">         if (ariaLandmarkRoleDescription)
</span><span class="cx">             return ariaLandmarkRoleDescription;
</span><span class="cx">         
</span><ins>+        if (m_object-&gt;isFigure())
+            return AXFigureText();
+        
</ins><span class="cx">         switch (m_object-&gt;roleValue()) {
</span><span class="cx">         case AudioRole:
</span><span class="cx">             return localizedMediaControlElementString(&quot;AudioElement&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.cpp        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -635,6 +635,11 @@
</span><span class="cx">     return WEB_UI_STRING(&quot;cancel&quot;, &quot;accessibility description for a search field cancel button&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String AXFigureText()
+{
+    return WEB_UI_STRING(&quot;figure&quot;, &quot;accessibility role description for a figure element.&quot;);
+}
+
</ins><span class="cx"> String AXButtonActionVerb()
</span><span class="cx"> {
</span><span class="cx">     return WEB_UI_STRING(&quot;press&quot;, &quot;Verb stating the action that will occur when a button is pressed, as used by accessibility&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.h        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -170,6 +170,7 @@
</span><span class="cx">     String AXAttachmentRoleText();
</span><span class="cx">     String AXDetailsText();
</span><span class="cx">     String AXSummaryText();
</span><ins>+    String AXFigureText();
</ins><span class="cx">     
</span><span class="cx">     String AXButtonActionVerb();
</span><span class="cx">     String AXRadioButtonActionVerb();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflLocalizedStringsEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -408,6 +408,11 @@
</span><span class="cx">     return String::fromUTF8(&quot;summary&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String AXFigureText()
+{
+    return String::fromUTF8(&quot;figure&quot;);
+}
+
</ins><span class="cx"> String AXFooterRoleDescriptionText()
</span><span class="cx"> {
</span><span class="cx">     return String::fromUTF8(&quot;footer&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgtkLocalizedStringsGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp (206942 => 206943)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp        2016-10-07 23:06:32 UTC (rev 206942)
+++ trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp        2016-10-07 23:30:16 UTC (rev 206943)
</span><span class="lines">@@ -456,6 +456,11 @@
</span><span class="cx">     return String::fromUTF8(_(&quot;summary&quot;));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String AXFigureText()
+{
+    return String::fromUTF8(_(&quot;figure&quot;));
+}
+
</ins><span class="cx"> String AXFooterRoleDescriptionText()
</span><span class="cx"> {
</span><span class="cx">     return String::fromUTF8(_(&quot;footer&quot;));
</span></span></pre>
</div>
</div>

</body>
</html>