Index: ui/views/bubble/bubble_frame_view.cc |
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc |
index 079300c90f2f8a8bad141d0cacb92f7ac96379d2..6a19a176b35c5845d52bf832ab5d46538837fa5a 100644 |
--- a/ui/views/bubble/bubble_frame_view.cc |
+++ b/ui/views/bubble/bubble_frame_view.cc |
@@ -133,6 +133,14 @@ Button* BubbleFrameView::CreateCloseButton(ButtonListener* listener) { |
} |
close_button->SetTooltipText(l10n_util::GetStringUTF16(IDS_APP_CLOSE)); |
close_button->SizeToPreferredSize(); |
+ |
+ // Remove the close button from tab traversal on all platforms. It defaults to |
msw
2017/07/12 17:20:25
nit: remove the "It defaults to" sentence
tapted
2017/07/12 23:49:10
Done.
|
+ // FocusBehavior::ACCESSIBLE_ONLY which (apart from on Mac) only affects |
+ // buttons in AccessiblePaneViews (which the close button is not). Note this |
+ // does not affect screen readers' ability to focus the element. Keyboard |
msw
2017/07/12 17:20:25
nit: s/element/close button/
tapted
2017/07/12 23:49:10
Done.
|
+ // access to this element when not using a screen reader is done via the ESC |
msw
2017/07/12 17:20:25
nit: s/this element/the close button/
tapted
2017/07/12 23:49:10
Done.
|
+ // key handler in DialogClientView. |
+ close_button->SetFocusBehavior(View::FocusBehavior::NEVER); |
return close_button; |
} |