Commit 9487ce03 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Allow focus to move into an editable combobox's listbox

In bug 593646 (https://codereview.chromium.org/2024053003/) a rule was
added, apparently similar to a rule in WebKit, that prevents
aria-activedescendant on an editable combobox field from moving focus
into its listbox. However, removing this condition fixes an issue where
the first item is not read. It also improves the verbalization,
providing the user with the positional info, e.g. "2 of 5".
Removing this line also does not seem to break the example attached to
bug 593646.

Bug: 1082865
Change-Id: I4250fb152f4b06f3c57b300ebe7ef5549c58d624
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303789Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790502}
parent a58012f7
......@@ -140,11 +140,6 @@ BrowserAccessibility* BrowserAccessibilityManagerMac::GetFocus() const {
if (!focus)
return nullptr;
// For editable combo boxes, focus should stay on the combo box so the user
// will not be taken out of the combo box while typing.
if (focus->GetRole() == ax::mojom::Role::kTextFieldWithComboBox)
return focus;
// Otherwise, follow the active descendant.
return GetActiveDescendant(focus);
}
......
AXWebArea
++AXGroup
++++AXStaticText AXValue='State'
++AXComboBox AXAutocompleteValue='list' AXFocused=1 AXTitle='State'
++AXComboBox AXAutocompleteValue='list' AXTitle='State'
++AXList
++++AXStaticText AXValue='Alabama'
++++AXStaticText AXValue='Alaska'
++++AXStaticText AXFocused=1 AXValue='Alaska'
\ No newline at end of file
AXExpandedChanged on AXComboBox
AXSelectedChildrenChanged on AXComboBox
AXFocusedUIElementChanged on AXComboBox
AXSelectedChildrenChanged on AXComboBox
\ No newline at end of file
AXSelectedChildrenChanged on AXComboBox
AXFocusedUIElementChanged on AXStaticText AXValue="Apple"
AXSelectedChildrenChanged on AXComboBox
\ No newline at end of file
AXFocusedUIElementChanged on AXStaticText AXValue="Apple"
AXSelectedChildrenChanged on AXComboBox
AXSelectedChildrenChanged on AXList
\ No newline at end of file
AXExpandedChanged on AXComboBox
AXFocusedUIElementChanged on AXStaticText AXValue="Apple"
AXSelectedChildrenChanged on AXComboBox
AXSelectedChildrenChanged on AXList
AXSelectedChildrenChanged on AXList
\ No newline at end of file
AXFocusedUIElementChanged on AXComboBox
AXSelectedTextChanged on AXComboBox
AXSelectedTextChanged on AXWebArea
AXFocusedUIElementChanged on AXStaticText AXValue="Apple not selected"
AXSelectedTextChanged on AXStaticText AXValue="Apple not selected"
AXSelectedTextChanged on AXWebArea
\ No newline at end of file
AXFocusedUIElementChanged on AXStaticText AXValue="Orange"
AXSelectedChildrenChanged on AXComboBox
AXSelectedChildrenChanged on AXList
=== Start Continuation ===
AXFocusedUIElementChanged on AXStaticText AXValue="Banana"
AXSelectedChildrenChanged on AXComboBox
AXSelectedChildrenChanged on AXList
AXSelectedChildrenChanged on AXList
\ No newline at end of file
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