Skip to content

Commit

Permalink
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.

(cherry picked from commit be11a30)

Bug: 1450993
Change-Id: I65cfa0e2c5daf2eaef19241e70e1f23670714216
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4585299
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1152873}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4586501
Commit-Queue: Srinivas Sista <srinivassista@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Srinivas Sista <srinivassista@chromium.org>
Cr-Commit-Position: refs/branch-heads/5735_90@{#8}
Cr-Branched-From: 386bc09-refs/branch-heads/5735@{#1052}
Cr-Branched-From: 2f562e4-refs/heads/main@{#1135570}
  • Loading branch information
janewman authored and Srinivas Sista committed Jun 4, 2023
1 parent 4d36d9f commit 27ae133
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
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 27ae133

Please sign in to comment.