• Abigail Klein's avatar
    Fire AXNewDocumentLoadComplete rather than AXLoadComplete. · 7df4f1fe
    Abigail Klein authored
    This fixes a bug where when a page loads, Voiceover focus shifts to
    the main content and starts reading it, regardless of whether the
    "Automatically speak the webpage" option is checked in VoiceOver Utility.
    It also sometimes causes focus changes to a different window when
    VoiceOver is launched. The underlying cause of this is that Voiceover
    hard-coded (using Chrome and Chromium's bundle IDs) us to automatically
    read the web page on an AXLoadComplete event. Webkit fires
    AXNewDocumentLoadComplete events rather than AXLoadComplete, so we
    adopt that here.
    
    For a much longer explanation and how we debugged this:
    https://docs.google.com/document/d/1Rn63cAf1ZVByfh2_ln9rRA388EFM2NVW3wzZo81Bw-c/edit#
    
    AX-Relnotes: Fix a bug where when a page loads, Voiceover focus shifts
    to the main content and starts reading it, regardless of whether the
    "Automatically speak the webpage" option is checked in VoiceOver Utility.
    
    Bug: 1049320
    Change-Id: Icf10fbd09bd17018ffe4d3efe9b656ed790d77c5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339769Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
    Commit-Queue: Abigail Klein <abigailbklein@google.com>
    Cr-Commit-Position: refs/heads/master@{#795490}
    7df4f1fe
browser_accessibility_manager_mac.mm 24.6 KB