| 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 95632d8e558266b1f6f1fabd15aed766e36c753c..4cb9ef1b623792532608bb526af3829eef1adc7a 100644
|
| --- a/ui/accessibility/platform/ax_platform_node_win.cc
|
| +++ b/ui/accessibility/platform/ax_platform_node_win.cc
|
| @@ -1026,9 +1026,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;
|
| }
|
|
|