Skip to content

Commit

Permalink
M115: Keep sending honey pot messages until we turn on web contents.
Browse files Browse the repository at this point in the history
This is a high priority change, the bug this fixes is stopping
all JAWS 2021 users from being able to access web contents.

With some Windows 11 features causing kNativeAPIs to be
turned on after startup, our honeypot code was no longer
being triggered. Since there are many other ways to turn
on accessibility this was not noticed until recently.
This change updates our logic to no longer consider the
fact that some accessibility has been enabled as an
indication that we no longer should fire the honey pot
event.

With this change we will continue to send honey pot events
until web contents accessibility has been turned on. The
honey pot will trigger web contents accessibility, and at
that point will no longer fire.

Bug: 1450993
Change-Id: I65cfa0e2c5daf2eaef19241e70e1f23670714216
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4582758
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/branch-heads/5790@{#357}
Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
  • Loading branch information
janewman authored and Chromium LUCI CQ committed Jun 5, 2023
1 parent 3b8aec9 commit 637e66f
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -201,9 +201,11 @@ bool LegacyRenderWidgetHostHWND::InitOrDeleteSelf(HWND parent) {
ax_fragment_root_ = std::make_unique<ui::AXFragmentRootWin>(hwnd(), this);
}

// Continue to send honey pot events until we have kWebContents to
// ensure screen readers have the opportunity to enable.
ui::AXMode mode =
BrowserAccessibilityStateImpl::GetInstance()->GetAccessibilityMode();
if (!mode.has_mode(ui::AXMode::kNativeAPIs)) {
if (!mode.has_mode(ui::AXMode::kWebContents)) {
// Attempt to detect screen readers or other clients who want full
// accessibility support, by seeing if they respond to this event.
NotifyWinEvent(EVENT_SYSTEM_ALERT, hwnd(), kIdScreenReaderHoneyPot,
Expand Down

0 comments on commit 637e66f

Please sign in to comment.