Skip to content

Commit

Permalink
[A11y] Fix DCHECK in UnignoredNextSibling
Browse files Browse the repository at this point in the history
Don't try to set controls relation automatically on ignored textfield.

(cherry picked from commit 3503f30)

Fixed: 1447023
Change-Id: Idf1e6228ab80f768acd59e6e861212d5b92e48d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4598128
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1154976}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4606627
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/5790@{#599}
Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
  • Loading branch information
aleventhal authored and Chromium LUCI CQ committed Jun 11, 2023
1 parent c84b3db commit fa87a1a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions third_party/blink/renderer/modules/accessibility/ax_object.cc
Expand Up @@ -2394,6 +2394,11 @@ AXObject* AXObject::GetControlsListboxForTextfieldCombobox() {
if (!ui::IsTextField(RoleValue()))
return nullptr;

// Object is ignored for some reason, most likely hidden.
if (AccessibilityIsIgnored()) {
return nullptr;
}

// Authors used to be told to use aria-owns to point from the textfield to the
// listbox. However, the aria-owns on a textfield must be ignored for its
// normal purpose because a textfield cannot have children. This code allows
Expand Down
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<div>
<div role="combobox">
<input id="textfield" role="textbox" aria-hidden="true" tabindex="-1" aria-readonly="true" aria-label="foo" aria-autocomplete="both">
<div role="listbox">
</div>
</div>
</div>

0 comments on commit fa87a1a

Please sign in to comment.