• Adam Ettenberger's avatar
    Invalidate aria-hidden subtree to update accessibility ignored and invisible states · 56e69a64
    Adam Ettenberger authored
    This CL addresses a Blink Accessibility invalidation gap, when a node's
    aria-hidden state changes, its blink accessibility subtree must also be
    invalidated so that the accessibility ignored and invisible states are
    serialized to the browser process.
    
    This is important because we rely on these states being accurate in the
    browser process, and we need need to receive the state changes through
    AXEventGenerator in order to send appropriate platform accessibility
    events, such as structure change events (add/remove child, hide/show,
    or 'children-changed').
    
    Adding AXObjectCacheImpl::HandleAriaHiddenChangedWithCleanLayout which
    handles this invalidation, and immediately handles
    ChildrenChangedWithCleanLayout on the parent of the modified node,
    and increments |modification_count_| to invalidate AXObject cached
    values. e.g. AccessibilityIsIgnored(), and IsInertOrAriaHidden().
    
    I needed to also modify BrowserAccessibilityWin::CanFireEvents to allow
    events to process for the corner case outlined in Bug:1159660.
    Because the node becoming ignored was the only child, the parent became
    a leaf node, and the node removed would return false for CanFireEvents
    because now it "IsChildOfLeaf()". I added a condition to check if the
    ignored state changed this frame, and if so, allow events to process.
    BrowserAccessibilityManagerWin filters platform events appropriately
    for nodes that are ignored.
    
    Bug: 1159660
    Change-Id: I82e2368c09d4855fdb834600aed7ac61d1883c65
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612365
    Commit-Queue: Adam Ettenberger <Adam.Ettenberger@microsoft.com>
    Reviewed-by: default avatarKurt Catti-Schmidt <kschmi@microsoft.com>
    Reviewed-by: default avatarJacques Newman <janewman@microsoft.com>
    Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#846165}
    56e69a64
aria-hidden-single-descendant-expected-blink.txt 456 Bytes