Commit 5602cce8 authored by tapted's avatar tapted Committed by Commit Bot

Remove the BubbleFrameView close button from tab traversal on all platforms.

The button defaults to FocusBehavior::ACCESSIBLE_ONLY which (apart from
on Mac) only affects buttons in AccessiblePaneViews (which the close
button is not). Make it FocusBehavior::NEVER so the behaviour is
consistent across platforms.

Note this does not affect screen readers' ability to focus the element.
Keyboard access to this element when not using a screen reader is done
via the ESC key handler in DialogClientView.

BUG=741251

Review-Url: https://codereview.chromium.org/2982533002
Cr-Commit-Position: refs/heads/master@{#486228}
parent 910f24f7
...@@ -133,6 +133,12 @@ Button* BubbleFrameView::CreateCloseButton(ButtonListener* listener) { ...@@ -133,6 +133,12 @@ Button* BubbleFrameView::CreateCloseButton(ButtonListener* listener) {
} }
close_button->SetTooltipText(l10n_util::GetStringUTF16(IDS_APP_CLOSE)); close_button->SetTooltipText(l10n_util::GetStringUTF16(IDS_APP_CLOSE));
close_button->SizeToPreferredSize(); close_button->SizeToPreferredSize();
// Remove the close button from tab traversal on all platforms. Note this does
// not affect screen readers' ability to focus the close button. Keyboard
// access to the close button when not using a screen reader is done via the
// ESC key handler in DialogClientView.
close_button->SetFocusBehavior(View::FocusBehavior::NEVER);
return close_button; return close_button;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment