Commit 80fcc000 authored by Nektarios Paisios's avatar Nektarios Paisios Committed by Commit Bot

According to spec native text controls should automatically get the ARIA textbox role

According to HTML to platform accessibility mappings 1.1 native text boxes input and textarea, but not content editables, should get an ARIA role of textbox.
I went through all our code in Blink and observed that aria-autocomplete was the only case where we didn't apply the same treatment to ARIA and native text controls.
R=aleventhal@chromium.org, dmazzoni@chromium.org

Bug: 761230
Change-Id: Ie25e0b072b24f1f6ebf6d5b2e317b656fb463fdf
Tested: manually, browser test
Reviewed-on: https://chromium-review.googlesource.com/804915
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521358}
parent 41821788
......@@ -3,4 +3,5 @@ android.webkit.WebView focusable focused scrollable
++++android.widget.EditText clickable editable_text focusable has_non_empty_value name='autocomplete=inline' input_type=1 text_change_added_count=19
++++android.widget.EditText clickable editable_text focusable has_non_empty_value name='autocomplete=list' input_type=1 text_change_added_count=17
++++android.widget.EditText clickable editable_text focusable has_non_empty_value name='autocomplete=both' input_type=1 text_change_added_count=17
++++android.widget.EditText clickable editable_text focusable has_non_empty_value name='autocomplete=none' input_type=1 text_change_added_count=17
\ No newline at end of file
++++android.widget.EditText clickable editable_text focusable has_non_empty_value name='autocomplete=none' input_type=1 text_change_added_count=17
++++android.widget.EditText clickable editable_text focusable has_non_empty_value name='No role with autocomplete=inline' input_type=1 text_change_added_count=32
......@@ -15,4 +15,8 @@ rootWebArea
++++textFieldWithComboBox haspopup
++++++genericContainer
++++++++staticText name='autocomplete=none'
++++++++++inlineTextBox name='autocomplete=none'
\ No newline at end of file
++++++++++inlineTextBox name='autocomplete=none'
++++textField autoComplete='inline'
++++++genericContainer
++++++++staticText name='No role with autocomplete=inline'
++++++++++inlineTextBox name='No role with autocomplete=inline'
......@@ -3,4 +3,5 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE
++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:inline
++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:list
++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:both
++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP
\ No newline at end of file
++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP
++++ROLE_SYSTEM_TEXT FOCUSABLE IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:inline
......@@ -8,5 +8,8 @@
<input role="combobox" aria-autocomplete="list" value="autocomplete=list">
<input role="combobox"aria-autocomplete="both" value="autocomplete=both">
<input role="combobox" aria-autocomplete="none" value="autocomplete=none">
<!-- Input elements of type text should map to an ARIA role of textbox. -->
<input type="text" aria-autocomplete="inline" value="No role with autocomplete=inline">
</body>
</html>
......@@ -1156,7 +1156,7 @@ unsigned AXNodeObject::HierarchicalLevel() const {
// TODO: rename this just AutoComplete, it's not only ARIA.
String AXNodeObject::AriaAutoComplete() const {
if (IsARIATextControl()) {
if (IsNativeTextControl() || IsARIATextControl()) {
const AtomicString& aria_auto_complete =
GetAOMPropertyOrARIAAttribute(AOMStringProperty::kAutocomplete)
.DeprecatedLower();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment