Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: ui/accessibility/platform/ax_platform_node_win.cc

Issue 1828853002: Merge to M50: Fix accessible focus state on menu bar container. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/platform/ax_platform_node_win.cc
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
index 168f2fea006cb530d868d7f307358de3ca049993..e11c21e6b99d730f34115e912e6c539022176166 100644
--- a/ui/accessibility/platform/ax_platform_node_win.cc
+++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -1050,9 +1050,15 @@ int AXPlatformNodeWin::MSAAState() {
msaa_state |= STATE_SYSTEM_FOCUSED;
// On Windows, the "focus" bit should be set on certain containers, like
- // menu bars, when one of their children has focus.
- if (GetData().role == ui::AX_ROLE_MENU_BAR && focus)
+ // menu bars, when visible.
+ //
+ // TODO(dmazzoni): this should probably check if focus is actually inside
+ // the menu bar, but we don't currently track focus inside menu pop-ups,
+ // and Chrome only has one menu visible at a time so this works for now.
+ if (GetData().role == ui::AX_ROLE_MENU_BAR &&
+ !(state & (1 << ui::AX_STATE_INVISIBLE))) {
msaa_state |= STATE_SYSTEM_FOCUSED;
+ }
return msaa_state;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698