Commit 242f4a44 authored by Peter Boström's avatar Peter Boström Committed by Commit Bot

Focus inactive bubbles in pane-cycle command

Makes unfocused popover dialogs keyboard accessible on non-MacOS where
F6 is used to cycle between different panes.

Follow-ups changes that are necessary are:

* Choose and utilize a different (non-function key) on MacOS.
* Update keyboard shortcut help documentation so users who search the
  web for "chrome dialog keyboard shortcut" has a chance of finding it.

This intentionally locks user focus inside the inactive bubble instead
of adding it to the pane cycle. Users who intend to use pane cycling
will need to accept or dismiss the dialog (normally using ESC) before
continuing pane cycling.

Bug: chromium:764918
Change-Id: Ib0144c9f914b63758f23454547c26907747f5939
Reviewed-on: https://chromium-review.googlesource.com/956528Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542644}
parent 76916d1b
......@@ -1107,6 +1107,13 @@ void BrowserView::FocusAppMenu() {
}
void BrowserView::RotatePaneFocus(bool forwards) {
// If an inactive bubble is showing this intentionally focuses that dialog to
// provide an easy access method to these dialogs without requring additional
// keyboard shortcuts or commands. To get back out to pane cycling the dialog
// needs to be accepted or dismissed.
if (GetLocationBarView()->ActivateFirstInactiveBubbleForAccessibility())
return;
GetFocusManager()->RotatePaneFocus(
forwards ?
views::FocusManager::kForward : views::FocusManager::kBackward,
......
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