Commit 569c175b authored by Dominic Mazzoni's avatar Dominic Mazzoni Committed by Commit Bot

Don't fire accessible location changed events on an aria-hidden node.

This is a small, targeted fix to prevent an issue where pages with
CSS animations - especially long-running animations like spinners -
experience poor performance with accessibility.

It's completely safe to suppress events when a node is aria-hidden.

Bug: 1090046
Change-Id: I431d53ffd97263e1013b5c5a0359f1d7515dce23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225497
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Mark Schillaci <mschillaci@google.com>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Auto-Submit: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarMark Schillaci <mschillaci@google.com>
Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773835}
parent efb8a7c9
......@@ -1362,6 +1362,14 @@ void AXObjectCacheImpl::ListboxActiveIndexChanged(HTMLSelectElement* select) {
}
void AXObjectCacheImpl::LocationChanged(LayoutObject* layout_object) {
// No need to send this notification if the object is aria-hidden.
// Note that if the node is ignored for other reasons, it still might
// be important to send this notification if any of its children are
// visible - but in the case of aria-hidden we can safely ignore it.
AXObject* obj = Get(layout_object);
if (obj && obj->AriaHiddenRoot())
return;
PostNotification(layout_object, ax::mojom::Event::kLocationChanged);
}
......
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