<!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>[198333] 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/198333">198333</a></dd>
<dt>Author</dt> <dd>cfleizach@apple.com</dd>
<dt>Date</dt> <dd>2016-03-17 09:38:56 -0700 (Thu, 17 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: Implement AutoFill Available attribute for a text field
https://bugs.webkit.org/show_bug.cgi?id=155567

Reviewed by Darin Adler.

Source/WebCore:

Expose the auto fill buttons to the AX hierarchy.
Add an attribute for the textfield to inform when the auto fill button is available.

Test: accessibility/auto-fill-types.html

* English.lproj/Localizable.strings:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::element):
(WebCore::AccessibilityObject::isValueAutofillAvailable):
(WebCore::AccessibilityObject::isValueAutofilled):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::passwordFieldValue):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* html/TextFieldInputType.cpp:
(WebCore::limitLength):
(WebCore::autoFillButtonTypeToAccessibilityLabel):
(WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
(WebCore::TextFieldInputType::createAutoFillButton):
(WebCore::TextFieldInputType::updateAutoFillButton):
* platform/LocalizedStrings.cpp:
(WebCore::AXListItemActionVerb):
(WebCore::AXAutoFillCredentialsLabel):
(WebCore::AXAutoFillContactsLabel):
(WebCore::AXARIAContentGroupText):
* platform/LocalizedStrings.h:

LayoutTests:

* accessibility/auto-fill-types-expected.txt: Added.
* accessibility/auto-fill-types.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="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjecth">trunk/Source/WebCore/accessibility/AccessibilityObject.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</a></li>
<li><a href="#trunkSourceWebCorehtmlTextFieldInputTypecpp">trunk/Source/WebCore/html/TextFieldInputType.cpp</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="#trunkLayoutTestsaccessibilityautofilltypesexpectedtxt">trunk/LayoutTests/accessibility/auto-fill-types-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilityautofilltypeshtml">trunk/LayoutTests/accessibility/auto-fill-types.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/LayoutTests/ChangeLog        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-03-16  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: Implement AutoFill Available attribute for a text field
+        https://bugs.webkit.org/show_bug.cgi?id=155567
+
+        Reviewed by Darin Adler.
+
+        * accessibility/auto-fill-types-expected.txt: Added.
+        * accessibility/auto-fill-types.html: Added.
+
</ins><span class="cx"> 2016-03-17  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Method names should not appear in the lexical scope of the method's body.
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilityautofilltypesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/auto-fill-types-expected.txt (0 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/auto-fill-types-expected.txt                                (rev 0)
+++ trunk/LayoutTests/accessibility/auto-fill-types-expected.txt        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+
+This tests that the auto-filled buttons show up.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Initial auto-fill available: false
+Contact button role: AXRole: AXButton
+Contact button label: AXDescription: contact info auto fill
+Credentials button role: AXRole: AXButton
+Credentials button label: AXDescription: password auto fill
+Post auto-fill available: true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilityautofilltypeshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/auto-fill-types.html (0 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/auto-fill-types.html                                (rev 0)
+++ trunk/LayoutTests/accessibility/auto-fill-types.html        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&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;input type=&quot;text&quot; value=&quot;hello&quot; id=&quot;textfield&quot;&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 auto-filled buttons show up.&quot;);
+
+    if (window.accessibilityController) {
+        var textField = document.getElementById(&quot;textfield&quot;);
+        var axTextField = accessibilityController.accessibleElementById(&quot;textfield&quot;);
+        debug(&quot;Initial auto-fill available: &quot; + axTextField.boolAttributeValue(&quot;AXValueAutofillAvailable&quot;));
+
+        window.internals.setShowAutoFillButton(document.getElementById(&quot;textfield&quot;), &quot;AutoFillButtonTypeContacts&quot;);
+        var contactsButton = axTextField.childAtIndex(1);
+        debug(&quot;Contact button role: &quot; + contactsButton.role);
+        debug(&quot;Contact button label: &quot; + contactsButton.description);
+
+        window.internals.setShowAutoFillButton(document.getElementById(&quot;textfield&quot;), &quot;AutoFillButtonTypeCredentials&quot;);
+        var credentialsButton = axTextField.childAtIndex(1);
+        debug(&quot;Credentials button role: &quot; + credentialsButton.role);
+        debug(&quot;Credentials button label: &quot; + credentialsButton.description);
+
+        debug(&quot;Post auto-fill available: &quot; + axTextField.boolAttributeValue(&quot;AXValueAutofillAvailable&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 (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/Source/WebCore/ChangeLog        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-03-16  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: Implement AutoFill Available attribute for a text field
+        https://bugs.webkit.org/show_bug.cgi?id=155567
+
+        Reviewed by Darin Adler.
+
+        Expose the auto fill buttons to the AX hierarchy.
+        Add an attribute for the textfield to inform when the auto fill button is available.
+
+        Test: accessibility/auto-fill-types.html
+
+        * English.lproj/Localizable.strings:
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::element):
+        (WebCore::AccessibilityObject::isValueAutofillAvailable):
+        (WebCore::AccessibilityObject::isValueAutofilled):
+        * accessibility/AccessibilityObject.h:
+        (WebCore::AccessibilityObject::passwordFieldValue):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::addTextFieldChildren):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+        * html/TextFieldInputType.cpp:
+        (WebCore::limitLength):
+        (WebCore::autoFillButtonTypeToAccessibilityLabel):
+        (WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
+        (WebCore::TextFieldInputType::createAutoFillButton):
+        (WebCore::TextFieldInputType::updateAutoFillButton):
+        * platform/LocalizedStrings.cpp:
+        (WebCore::AXListItemActionVerb):
+        (WebCore::AXAutoFillCredentialsLabel):
+        (WebCore::AXAutoFillContactsLabel):
+        (WebCore::AXARIAContentGroupText):
+        * platform/LocalizedStrings.h:
+
</ins><span class="cx"> 2016-03-17  Csaba Osztrogonác  &lt;ossy@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac][cmake] Unreviewed speculative buildfix after r198179. Just for fun.
</span></span></pre></div>
<a id="trunkSourceWebCoreEnglishlprojLocalizablestrings"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/English.lproj/Localizable.strings        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -760,6 +760,9 @@
</span><span class="cx"> /* HTTP result code string */
</span><span class="cx"> &quot;conflict&quot; = &quot;conflict&quot;;
</span><span class="cx"> 
</span><ins>+/* Label for the auto fill contacts button inside a text field. */
+&quot;contact info auto fill&quot; = &quot;contact info auto fill&quot;;
+
</ins><span class="cx"> /* An ARIA accessibility group that contains content. */
</span><span class="cx"> &quot;content information&quot; = &quot;content information&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -934,6 +937,9 @@
</span><span class="cx"> /* HTTP result code string */
</span><span class="cx"> &quot;partial content&quot; = &quot;partial content&quot;;
</span><span class="cx"> 
</span><ins>+/* Label for the auto fill credentials button inside a text field. */
+&quot;password auto fill&quot; = &quot;password auto fill&quot;;
+
</ins><span class="cx"> /* Validation message for input form controls requiring a constrained value according to pattern */
</span><span class="cx"> &quot;pattern mismatch&quot; = &quot;pattern mismatch&quot;;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -2197,13 +2197,25 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx">     
</span><ins>+bool AccessibilityObject::isValueAutofillAvailable() const
+{
+    if (!isNativeTextControl())
+        return false;
+    
+    Node* node = this-&gt;node();
+    if (!is&lt;HTMLInputElement&gt;(node))
+        return false;
+    
+    return downcast&lt;HTMLInputElement&gt;(*node).autoFillButtonType() != AutoFillButtonType::None;
+}
+    
</ins><span class="cx"> bool AccessibilityObject::isValueAutofilled() const
</span><span class="cx"> {
</span><span class="cx">     if (!isNativeTextControl())
</span><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx">     Node* node = this-&gt;node();
</span><del>-    if (!node || !is&lt;HTMLInputElement&gt;(*node))
</del><ins>+    if (!is&lt;HTMLInputElement&gt;(node))
</ins><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx">     return downcast&lt;HTMLInputElement&gt;(*node).isAutoFilled();
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.h        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -891,6 +891,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual String passwordFieldValue() const { return String(); }
</span><span class="cx">     bool isValueAutofilled() const;
</span><ins>+    bool isValueAutofillAvailable() const;
</ins><span class="cx">     
</span><span class="cx">     // Used by an ARIA tree to get all its rows.
</span><span class="cx">     void ariaTreeRows(AccessibilityChildrenVector&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -156,6 +156,10 @@
</span><span class="cx"> #define NSAccessibilityValueAutofilledAttribute @&quot;AXValueAutofilled&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#ifndef NSAccessibilityValueAutofillAvailableAttribute
+#define NSAccessibilityValueAutofillAvailableAttribute @&quot;AXValueAutofillAvailable&quot;
+#endif
+
</ins><span class="cx"> #ifndef NSAccessibilityLanguageAttribute
</span><span class="cx"> #define NSAccessibilityLanguageAttribute @&quot;AXLanguage&quot;
</span><span class="cx"> #endif
</span><span class="lines">@@ -3196,6 +3200,9 @@
</span><span class="cx">     if ([attributeName isEqualToString:NSAccessibilityPlaceholderValueAttribute])
</span><span class="cx">         return m_object-&gt;placeholderValue();
</span><span class="cx"> 
</span><ins>+    if ([attributeName isEqualToString:NSAccessibilityValueAutofillAvailableAttribute])
+        return @(m_object-&gt;isValueAutofillAvailable());
+    
</ins><span class="cx">     if ([attributeName isEqualToString:NSAccessibilityValueAutofilledAttribute])
</span><span class="cx">         return @(m_object-&gt;isValueAutofilled());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlTextFieldInputTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/TextFieldInputType.cpp (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/TextFieldInputType.cpp        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/Source/WebCore/html/TextFieldInputType.cpp        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include &quot;HTMLInputElement.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;KeyboardEvent.h&quot;
</span><ins>+#include &quot;LocalizedStrings.h&quot;
</ins><span class="cx"> #include &quot;NodeRenderStyle.h&quot;
</span><span class="cx"> #include &quot;Page.h&quot;
</span><span class="cx"> #include &quot;PlatformKeyboardEvent.h&quot;
</span><span class="lines">@@ -399,6 +400,20 @@
</span><span class="cx">     return string.left(newLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static String autoFillButtonTypeToAccessibilityLabel(AutoFillButtonType autoFillButtonType)
+{
+    switch (autoFillButtonType) {
+    case AutoFillButtonType::Contacts:
+        return AXAutoFillContactsLabel();
+    case AutoFillButtonType::Credentials:
+        return AXAutoFillCredentialsLabel();
+    default:
+    case AutoFillButtonType::None:
+        ASSERT_NOT_REACHED();
+        return AtomicString();
+    }
+}
+    
</ins><span class="cx"> static AtomicString autoFillButtonTypeToAutoFillButtonPseudoClassName(AutoFillButtonType autoFillButtonType)
</span><span class="cx"> {
</span><span class="cx">     AtomicString pseudoClassName;
</span><span class="lines">@@ -648,6 +663,8 @@
</span><span class="cx"> 
</span><span class="cx">     m_autoFillButton = AutoFillButtonElement::create(element().document(), *this);
</span><span class="cx">     m_autoFillButton-&gt;setPseudo(autoFillButtonTypeToAutoFillButtonPseudoClassName(autoFillButtonType));
</span><ins>+    m_autoFillButton-&gt;setAttribute(roleAttr, &quot;button&quot;);
+    m_autoFillButton-&gt;setAttribute(aria_labelAttr, autoFillButtonTypeToAccessibilityLabel(autoFillButtonType));
</ins><span class="cx">     m_container-&gt;appendChild(*m_autoFillButton, IGNORE_EXCEPTION);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -662,9 +679,10 @@
</span><span class="cx"> 
</span><span class="cx">         const AtomicString&amp; attribute = m_autoFillButton-&gt;fastGetAttribute(pseudoAttr);
</span><span class="cx">         bool shouldUpdateAutoFillButtonType = isAutoFillButtonTypeChanged(attribute, element().autoFillButtonType());
</span><del>-        if (shouldUpdateAutoFillButtonType)
</del><ins>+        if (shouldUpdateAutoFillButtonType) {
</ins><span class="cx">             m_autoFillButton-&gt;setPseudo(autoFillButtonTypeToAutoFillButtonPseudoClassName(element().autoFillButtonType()));
</span><del>-
</del><ins>+            m_autoFillButton-&gt;setAttribute(aria_labelAttr, autoFillButtonTypeToAccessibilityLabel(element().autoFillButtonType()));
+        }
</ins><span class="cx">         m_autoFillButton-&gt;setInlineStyleProperty(CSSPropertyDisplay, CSSValueBlock, true);
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.cpp        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -654,6 +654,16 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // !PLATFORM(IOS)
</span><span class="cx"> 
</span><ins>+String AXAutoFillCredentialsLabel()
+{
+    return WEB_UI_STRING(&quot;password auto fill&quot;, &quot;Label for the auto fill credentials button inside a text field.&quot;);
+}
+
+String AXAutoFillContactsLabel()
+{
+    return WEB_UI_STRING(&quot;contact info auto fill&quot;, &quot;Label for the auto fill contacts button inside a text field.&quot;);
+}
+    
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> String AXARIAContentGroupText(const String&amp; ariaType)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.h        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -183,6 +183,9 @@
</span><span class="cx">     String AXARIAContentGroupText(const String&amp; ariaType);
</span><span class="cx">     String AXHorizontalRuleDescriptionText();
</span><span class="cx"> #endif
</span><ins>+    
+    String AXAutoFillCredentialsLabel();
+    String AXAutoFillContactsLabel();
</ins><span class="cx"> 
</span><span class="cx">     String missingPluginText();
</span><span class="cx">     String crashedPluginText();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflLocalizedStringsEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -407,7 +407,17 @@
</span><span class="cx"> {
</span><span class="cx">     return String::fromUTF8(&quot;cancel&quot;);
</span><span class="cx"> }
</span><ins>+    
+String AXAutoFillCredentialsLabel()
+{
+    return String::fromUTF8(&quot;password auto fill&quot;);
+}
</ins><span class="cx"> 
</span><ins>+String AXAutoFillContactsLabel()
+{
+    return String::fromUTF8(&quot;contact info auto fill&quot;);
+}
+
</ins><span class="cx"> String AXButtonActionVerb()
</span><span class="cx"> {
</span><span class="cx">     return String::fromUTF8(&quot;press&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgtkLocalizedStringsGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp (198332 => 198333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp        2016-03-17 14:58:57 UTC (rev 198332)
+++ trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp        2016-03-17 16:38:56 UTC (rev 198333)
</span><span class="lines">@@ -456,6 +456,16 @@
</span><span class="cx">     return String::fromUTF8(_(&quot;cancel&quot;));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String AXAutoFillCredentialsLabel()
+{
+    return String::fromUTF8(_(&quot;password auto fill&quot;));
+}
+
+String AXAutoFillContactsLabel()
+{
+    return String::fromUTF8(_(&quot;contact info auto fill&quot;));
+}
+    
</ins><span class="cx"> String AXButtonActionVerb()
</span><span class="cx"> {
</span><span class="cx">     return String::fromUTF8(_(&quot;press&quot;));
</span></span></pre>
</div>
</div>

</body>
</html>