<!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>[195463] 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/195463">195463</a></dd>
<dt>Author</dt> <dd>cfleizach@apple.com</dd>
<dt>Date</dt> <dd>2016-01-22 11:31:22 -0800 (Fri, 22 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: &lt;code&gt; group and friends should have a custom subrole
https://bugs.webkit.org/show_bug.cgi?id=153282

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Add some custom subroles for the mac for code, ins, del, cite, var, samp, pre, kbd,
so that assistive tech can recognize them.

Test: accessibility/mac/subroles-for-formatted-groups.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isStyleFormatGroup):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

* accessibility/duplicate-child-nodes-expected.txt:
* accessibility/mac/subroles-for-formatted-groups-expected.txt: Added.
* accessibility/mac/subroles-for-formatted-groups.html: Added.
* accessibility/roles-computedRoleString-expected.txt:
* accessibility/roles-computedRoleString.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsaccessibilityduplicatechildnodesexpectedtxt">trunk/LayoutTests/accessibility/duplicate-child-nodes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilityrolescomputedRoleStringexpectedtxt">trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilityrolescomputedRoleStringhtml">trunk/LayoutTests/accessibility/roles-computedRoleString.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityrolesexposedexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</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>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilitymacsubrolesforformattedgroupsexpectedtxt">trunk/LayoutTests/accessibility/mac/subroles-for-formatted-groups-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacsubrolesforformattedgroupshtml">trunk/LayoutTests/accessibility/mac/subroles-for-formatted-groups.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195462 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-22 19:31:06 UTC (rev 195462)
+++ trunk/LayoutTests/ChangeLog        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-01-22  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: &lt;code&gt; group and friends should have a custom subrole
+        https://bugs.webkit.org/show_bug.cgi?id=153282
+
+        Reviewed by Mario Sanchez Prada.
+
+        * accessibility/duplicate-child-nodes-expected.txt:
+        * accessibility/mac/subroles-for-formatted-groups-expected.txt: Added.
+        * accessibility/mac/subroles-for-formatted-groups.html: Added.
+        * accessibility/roles-computedRoleString-expected.txt:
+        * accessibility/roles-computedRoleString.html:
+
</ins><span class="cx"> 2016-01-22  Skachkov Oleksandr  &lt;gskachkov@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ES6] Arrow function. Default arguments in arrow functions
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilityduplicatechildnodesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/duplicate-child-nodes-expected.txt (195462 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/duplicate-child-nodes-expected.txt        2016-01-22 19:31:06 UTC (rev 195462)
+++ trunk/LayoutTests/accessibility/duplicate-child-nodes-expected.txt        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -3,6 +3,7 @@
</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="cx"> 
</span><span class="cx"> 
</span><ins>+PASS webArea.childAtIndex(0).isEqual(webArea.childAtIndex(1)) is 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="trunkLayoutTestsaccessibilitymacsubrolesforformattedgroupsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/mac/subroles-for-formatted-groups-expected.txt (0 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/subroles-for-formatted-groups-expected.txt                                (rev 0)
+++ trunk/LayoutTests/accessibility/mac/subroles-for-formatted-groups-expected.txt        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+code
+kbd
+sample
+pre
+var insert delete cite
+This test makes sure that formatting style groups.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+code: AXSubrole: AXCodeStyleGroup
+kbd: AXSubrole: AXKeyboardInputStyleGroup
+samp: AXSubrole: AXSampleStyleGroup
+pre: AXSubrole: AXPreformattedStyleGroup
+var: AXSubrole: AXVariableStyleGroup
+ins: AXSubrole: AXInsertStyleGroup
+del: AXSubrole: AXDeleteStyleGroup
+cite: AXSubrole: AXCiteStyleGroup
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacsubrolesforformattedgroupshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/mac/subroles-for-formatted-groups.html (0 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/subroles-for-formatted-groups.html                                (rev 0)
+++ trunk/LayoutTests/accessibility/mac/subroles-for-formatted-groups.html        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -0,0 +1,39 @@
</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;code id=&quot;code&quot;&gt;code&lt;/code&gt;&lt;br&gt;
+&lt;kbd id=&quot;kbd&quot;&gt;kbd&lt;/kbd&gt;&lt;br&gt;
+&lt;samp id=&quot;samp&quot;&gt;sample&lt;/samp&gt;&lt;br&gt;
+&lt;pre id=&quot;pre&quot;&gt;pre&lt;/pre&gt;
+&lt;var id=&quot;var&quot;&gt;var&lt;/var&gt;
+&lt;ins id=&quot;ins&quot;&gt;insert&lt;/ins&gt;
+&lt;del id=&quot;del&quot;&gt;delete&lt;/del&gt;
+&lt;cite id=&quot;cite&quot;&gt;cite&lt;/cite&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 test makes sure that formatting style groups.&quot;);
+
+    if (window.accessibilityController) {
+          debug(&quot;code: &quot; + accessibilityController.accessibleElementById('code').subrole);
+          debug(&quot;kbd: &quot; + accessibilityController.accessibleElementById('kbd').subrole);
+          debug(&quot;samp: &quot; + accessibilityController.accessibleElementById('samp').subrole);
+          debug(&quot;pre: &quot; + accessibilityController.accessibleElementById('pre').subrole);
+          debug(&quot;var: &quot; + accessibilityController.accessibleElementById('var').subrole);
+          debug(&quot;ins: &quot; + accessibilityController.accessibleElementById('ins').subrole);
+          debug(&quot;del: &quot; + accessibilityController.accessibleElementById('del').subrole);
+          debug(&quot;cite: &quot; + accessibilityController.accessibleElementById('cite').subrole);
+    }
+
+&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="trunkLayoutTestsaccessibilityrolescomputedRoleStringexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt (195462 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt        2016-01-22 19:31:06 UTC (rev 195462)
+++ trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -42,14 +42,16 @@
</span><span class="cx"> PASS: input[type='time'] -&gt; . 
</span><span class="cx"> PASS: input[type='url'] -&gt; . 
</span><span class="cx"> PASS: input[type='week'] -&gt; . 
</span><ins>+PASS: ins -&gt; group. 
</ins><span class="cx"> PASS: math -&gt; math. 
</span><span class="cx"> PASS: meter -&gt; progressbar. 
</span><span class="cx"> PASS: nav -&gt; navigation. 
</span><span class="cx"> PASS: ol -&gt; list. 
</span><span class="cx"> PASS: li -&gt; listitem. 
</span><span class="cx"> PASS: p -&gt; . 
</span><del>-PASS: pre -&gt; . 
</del><ins>+PASS: pre -&gt; group. 
</ins><span class="cx"> PASS: progress -&gt; progressbar. 
</span><ins>+PASS: samp -&gt; group. 
</ins><span class="cx"> PASS: section -&gt; region. 
</span><span class="cx"> PASS: select:not([multiple]) -&gt; . 
</span><span class="cx"> PASS: select[multiple] -&gt; listbox. 
</span><span class="lines">@@ -74,6 +76,7 @@
</span><span class="cx"> PASS: textarea -&gt; textbox. 
</span><span class="cx"> PASS: ul -&gt; list. 
</span><span class="cx"> PASS: li -&gt; listitem. 
</span><ins>+PASS: var -&gt; group. 
</ins><span class="cx"> PASS: div[role=&quot;command&quot;] -&gt; . 
</span><span class="cx"> PASS: div[role=&quot;composite&quot;] -&gt; . 
</span><span class="cx"> PASS: div[role=&quot;input&quot;] -&gt; . 
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilityrolescomputedRoleStringhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/roles-computedRoleString.html (195462 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/roles-computedRoleString.html        2016-01-22 19:31:06 UTC (rev 195462)
+++ trunk/LayoutTests/accessibility/roles-computedRoleString.html        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> &lt;input type=&quot;time&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='time']&quot;&gt;
</span><span class="cx"> &lt;input type=&quot;url&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='url']&quot;&gt;
</span><span class="cx"> &lt;input type=&quot;week&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='week']&quot;&gt;
</span><del>-&lt;ins data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/ins&gt;
</del><ins>+&lt;ins data-role=&quot;group&quot; class=&quot;ex&quot;&gt;X&lt;/ins&gt;
</ins><span class="cx"> &lt;mark data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/mark&gt;
</span><span class="cx"> &lt;math data-role=&quot;math&quot; class=&quot;ex&quot;&gt;X&lt;/math&gt;
</span><span class="cx"> &lt;!-- skipped &lt;menu&gt; --&gt;
</span><span class="lines">@@ -69,12 +69,12 @@
</span><span class="cx"> &lt;!-- skipped &lt;output&gt; --&gt;
</span><span class="cx"> &lt;p data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/p&gt;
</span><span class="cx"> &lt;!-- skipped &lt;param&gt; --&gt;
</span><del>-&lt;pre data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/pre&gt;
</del><ins>+&lt;pre data-role=&quot;group&quot; class=&quot;ex&quot;&gt;X&lt;/pre&gt;
</ins><span class="cx"> &lt;progress data-role=&quot;progressbar&quot; class=&quot;ex&quot; value=&quot;0.75&quot;&gt;X&lt;/progress&gt;
</span><span class="cx"> &lt;q data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/q&gt;
</span><span class="cx"> &lt;!-- skipped &lt;ruby/rp/rt&gt; --&gt;
</span><span class="cx"> &lt;s data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/s&gt;
</span><del>-&lt;samp data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/samp&gt;
</del><ins>+&lt;samp data-role=&quot;group&quot; class=&quot;ex&quot;&gt;X&lt;/samp&gt;
</ins><span class="cx"> &lt;!-- skipped &lt;script&gt; --&gt;
</span><span class="cx"> &lt;section data-role=&quot;region&quot; class=&quot;ex&quot;&gt;X&lt;/section&gt;
</span><span class="cx"> &lt;select data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;:not([multiple])&quot;&gt;
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx"> &lt;ul data-role=&quot;list&quot; class=&quot;ex&quot;&gt;
</span><span class="cx">     &lt;li data-role=&quot;listitem&quot; class=&quot;ex&quot;&gt;X&lt;/li&gt;
</span><span class="cx"> &lt;/ul&gt;
</span><del>-&lt;var data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/var&gt;
</del><ins>+&lt;var data-role=&quot;group&quot; class=&quot;ex&quot;&gt;X&lt;/var&gt;
</ins><span class="cx"> &lt;wbr data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/wbr&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;!-- ==================================================================================================== --&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityrolesexposedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt (195462 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt        2016-01-22 19:31:06 UTC (rev 195462)
+++ trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -70,24 +70,24 @@
</span><span class="cx">       AXRoleDescription: 
</span><span class="cx">       
</span><span class="cx"> cite
</span><del>-      AXRole: 
-      AXSubrole: 
-      AXRoleDescription: 
</del><ins>+      AXRole: AXGroup
+      AXSubrole: AXCiteStyleGroup
+      AXRoleDescription: group
</ins><span class="cx">       
</span><span class="cx"> code
</span><del>-      AXRole: 
-      AXSubrole: 
-      AXRoleDescription: 
</del><ins>+      AXRole: AXGroup
+      AXSubrole: AXCodeStyleGroup
+      AXRoleDescription: group
</ins><span class="cx">       
</span><span class="cx"> del:not([datetime])
</span><del>-      AXRole: 
-      AXSubrole: 
-      AXRoleDescription: 
</del><ins>+      AXRole: AXGroup
+      AXSubrole: AXDeleteStyleGroup
+      AXRoleDescription: group
</ins><span class="cx">       
</span><span class="cx"> del[datetime]
</span><del>-      AXRole: 
-      AXSubrole: 
-      AXRoleDescription: 
</del><ins>+      AXRole: AXGroup
+      AXSubrole: AXDeleteStyleGroup
+      AXRoleDescription: group
</ins><span class="cx">       
</span><span class="cx"> dfn
</span><span class="cx">       AXRole: AXGroup
</span><span class="lines">@@ -335,14 +335,14 @@
</span><span class="cx">       AXRoleDescription: text field
</span><span class="cx">       
</span><span class="cx"> ins:not([datetime])
</span><del>-      AXRole: 
-      AXSubrole: 
-      AXRoleDescription: 
</del><ins>+      AXRole: AXGroup
+      AXSubrole: AXInsertStyleGroup
+      AXRoleDescription: group
</ins><span class="cx">       
</span><span class="cx"> ins[datetime]
</span><del>-      AXRole: 
-      AXSubrole: 
-      AXRoleDescription: 
</del><ins>+      AXRole: AXGroup
+      AXSubrole: AXInsertStyleGroup
+      AXRoleDescription: group
</ins><span class="cx">       
</span><span class="cx"> map
</span><span class="cx">       AXRole: 
</span><span class="lines">@@ -556,7 +556,7 @@
</span><span class="cx">       
</span><span class="cx"> pre
</span><span class="cx">       AXRole: AXGroup
</span><del>-      AXSubrole: 
</del><ins>+      AXSubrole: AXPreformattedStyleGroup
</ins><span class="cx">       AXRoleDescription: group
</span><span class="cx">       
</span><span class="cx"> progress
</span><span class="lines">@@ -575,9 +575,9 @@
</span><span class="cx">       AXRoleDescription: 
</span><span class="cx">       
</span><span class="cx"> samp
</span><del>-      AXRole: 
-      AXSubrole: 
-      AXRoleDescription: 
</del><ins>+      AXRole: AXGroup
+      AXSubrole: AXSampleStyleGroup
+      AXRoleDescription: group
</ins><span class="cx">       
</span><span class="cx"> section
</span><span class="cx">       AXRole: AXGroup
</span><span class="lines">@@ -730,9 +730,9 @@
</span><span class="cx">       AXRoleDescription: group
</span><span class="cx">       
</span><span class="cx"> var
</span><del>-      AXRole: 
-      AXSubrole: 
-      AXRoleDescription: 
</del><ins>+      AXRole: AXGroup
+      AXSubrole: AXVariableStyleGroup
+      AXRoleDescription: group
</ins><span class="cx">       
</span><span class="cx"> wbr
</span><span class="cx">       AXRole: 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195462 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-22 19:31:06 UTC (rev 195462)
+++ trunk/Source/WebCore/ChangeLog        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-01-22  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: &lt;code&gt; group and friends should have a custom subrole
+        https://bugs.webkit.org/show_bug.cgi?id=153282
+
+        Reviewed by Mario Sanchez Prada.
+
+        Add some custom subroles for the mac for code, ins, del, cite, var, samp, pre, kbd,
+        so that assistive tech can recognize them.
+
+        Test: accessibility/mac/subroles-for-formatted-groups.html
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::isStyleFormatGroup):
+        * accessibility/AccessibilityObject.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
+        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper subrole]):
+
</ins><span class="cx"> 2016-01-22  Enrica Casucci  &lt;enrica@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove dependency from DataDetectorsCore on iOS.
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (195462 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-01-22 19:31:06 UTC (rev 195462)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -2940,6 +2940,18 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+bool AccessibilityObject::isStyleFormatGroup() const
+{
+    Node* node = this-&gt;node();
+    if (!node)
+        return false;
+    
+    return node-&gt;hasTagName(kbdTag) || node-&gt;hasTagName(codeTag)
+    || node-&gt;hasTagName(preTag) || node-&gt;hasTagName(sampTag)
+    || node-&gt;hasTagName(varTag) || node-&gt;hasTagName(citeTag)
+    || node-&gt;hasTagName(insTag) || node-&gt;hasTagName(delTag);
+}
+    
</ins><span class="cx"> bool AccessibilityObject::isContainedByPasswordField() const
</span><span class="cx"> {
</span><span class="cx">     Node* node = this-&gt;node();
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (195462 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.h        2016-01-22 19:31:06 UTC (rev 195462)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -540,7 +540,8 @@
</span><span class="cx">     bool isMeter() const;
</span><span class="cx">     bool isSplitter() const { return roleValue() == SplitterRole; }
</span><span class="cx">     bool isToolbar() const { return roleValue() == ToolbarRole; }
</span><del>-
</del><ins>+    bool isStyleFormatGroup() const;
+    
</ins><span class="cx">     virtual bool isChecked() const { return false; }
</span><span class="cx">     virtual bool isEnabled() const { return false; }
</span><span class="cx">     virtual bool isSelected() const { return false; }
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (195462 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2016-01-22 19:31:06 UTC (rev 195462)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -1386,6 +1386,9 @@
</span><span class="cx">     if (node &amp;&amp; node-&gt;hasTagName(dfnTag))
</span><span class="cx">         return false;
</span><span class="cx">     
</span><ins>+    if (isStyleFormatGroup())
+        return false;
+    
</ins><span class="cx">     // Make sure that ruby containers are not ignored.
</span><span class="cx">     if (m_renderer-&gt;isRubyRun() || m_renderer-&gt;isRubyBlock() || m_renderer-&gt;isRubyInline())
</span><span class="cx">         return false;
</span><span class="lines">@@ -2581,7 +2584,10 @@
</span><span class="cx">         return SVGRootRole;
</span><span class="cx">     if (node &amp;&amp; node-&gt;hasTagName(SVGNames::gTag))
</span><span class="cx">         return GroupRole;
</span><del>-
</del><ins>+    
+    if (isStyleFormatGroup())
+        return GroupRole;
+    
</ins><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx">     if (node &amp;&amp; node-&gt;hasTagName(MathMLNames::mathTag))
</span><span class="cx">         return DocumentMathRole;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (195462 => 195463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2016-01-22 19:31:06 UTC (rev 195462)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2016-01-22 19:31:22 UTC (rev 195463)
</span><span class="lines">@@ -2361,6 +2361,27 @@
</span><span class="cx">     if (m_object-&gt;isSwitch())
</span><span class="cx">         return NSAccessibilitySwitchSubrole;
</span><span class="cx"> 
</span><ins>+    if (role == GroupRole) {
+        if (Node* node = m_object-&gt;node()) {
+            if (node-&gt;hasTagName(kbdTag))
+                return @&quot;AXKeyboardInputStyleGroup&quot;;
+            if (node-&gt;hasTagName(codeTag))
+                return @&quot;AXCodeStyleGroup&quot;;
+            if (node-&gt;hasTagName(preTag))
+                return @&quot;AXPreformattedStyleGroup&quot;;
+            if (node-&gt;hasTagName(sampTag))
+                return @&quot;AXSampleStyleGroup&quot;;
+            if (node-&gt;hasTagName(varTag))
+                return @&quot;AXVariableStyleGroup&quot;;
+            if (node-&gt;hasTagName(citeTag))
+                return @&quot;AXCiteStyleGroup&quot;;
+            if (node-&gt;hasTagName(insTag))
+                return @&quot;AXInsertStyleGroup&quot;;
+            if (node-&gt;hasTagName(delTag))
+                return @&quot;AXDeleteStyleGroup&quot;;
+        }
+    }
+    
</ins><span class="cx">     // Ruby subroles
</span><span class="cx">     switch (role) {
</span><span class="cx">     case RubyBaseRole:
</span></span></pre>
</div>
</div>

</body>
</html>