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

Issue 1894383002: MacViews: Implement Full Keyboard Access. (Closed)

Created:
4 years, 8 months ago by karandeepb
Modified:
4 years, 7 months ago
Reviewers:
tapted, sky, Evan Stade
CC:
chromium-reviews, msramek+watch_chromium.org, sadrul, yusukes+watch_chromium.org, bondd+autofillwatch_chromium.org, markusheintz_, tapted, Matt Giuca, nona+watch_chromium.org, raymes+watch_chromium.org, Peter Beverloo, vabr+watchlistautofill_chromium.org, kalyank, vabr+watchlistpasswordmanager_chromium.org, rouslan+autofill_chromium.org, mlamouri+watch-notifications_chromium.org, oshima+watch_chromium.org, gcasto+watchlist_chromium.org, sync-reviews_chromium.org, mkwst+watchlist-passwords_chromium.org, tfarina, shuchen+watch_chromium.org, jdonnelly+autofillwatch_chromium.org, estade+watch_chromium.org, James Su, davemoore+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@SetFocusBehavior
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Implement Full Keyboard Access. Currently MacViews does not respect the full keyboard accessibility setting. In the normal mode, as per Full Keyboard Access, only text boxes and lists should get focus. However, currently, views like comboboxes, buttons, links etc. get focus in the normal mode. This CL implements Full Keyboard access by adding a platform level keyboard accessibility setting to the FocusManager class. Other changes- - Adds a static ConfigureDefaultFocus() method to ui/views/controls/button/button.h - Adds ScopedFakeFullKeyboardAccess to ViewsTestHelperMac to swizzle [NSAppl isFullKeyboardAccessEnabled] for use in tests. - ScopedFakeNSWindowFocus now also swizzles orderOut: to determine if the currently focused window is ordered-out. - View::RequestToFocus now uses IsAccessibilityFocusable() instead of IsFocusable(). For prior discussion related to this CL, see crrev.com/1690543004. Doc - https://docs.google.com/document/d/16A_kZHCIaDEGZGIIZfEJ7sfFJD4829GcPxycuMBysW0/edit BUG=564912 Committed: https://crrev.com/24c156252c11425af51d646cd0d405f018c70bb8 Cr-Commit-Position: refs/heads/master@{#391744}

Patch Set 1 : #

Total comments: 1

Patch Set 2 : Rebased. #

Total comments: 54

Patch Set 3 : Rebased. #

Patch Set 4 : Address review comments. #

Total comments: 16

Patch Set 5 : Rebased #

Patch Set 6 : Address review comments. #

Total comments: 4

Patch Set 7 : Address nits. #

Patch Set 8 : Rebased #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+598 lines, -187 lines) Patch
M ash/shell/lock_view.cc View 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/tray_popup_header_button.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/tray_popup_label_button.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ash/system/user/button_from_view.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/options/wifi_config_view.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/options/wimax_config_view.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/autofill/autofill_dialog_views.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/find_bar_view.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_view.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_icon_view.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/passwords/manage_passwords_icon_views.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/profiles/profile_chooser_view.cc View 1 2 3 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc View 1 chunk +1 line, -1 line 3 comments Download
M chrome/browser/ui/views/toolbar/app_menu.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/website_settings/chosen_object_view.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/website_settings/permission_selector_view.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/app_list/views/folder_header_view.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A ui/base/test/scoped_fake_full_keyboard_access.h View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
A ui/base/test/scoped_fake_full_keyboard_access.mm View 1 2 3 4 5 1 chunk +56 lines, -0 lines 0 comments Download
M ui/base/test/scoped_fake_nswindow_focus.h View 2 chunks +4 lines, -3 lines 0 comments Download
M ui/base/test/scoped_fake_nswindow_focus.mm View 1 2 3 3 chunks +15 lines, -1 line 0 comments Download
M ui/base/ui_base.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M ui/message_center/views/message_center_button_bar.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/message_center/views/message_center_view.cc View 1 chunk +10 lines, -2 lines 0 comments Download
M ui/message_center/views/notification_button.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/message_center/views/notifier_settings_view.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/message_center/views/padded_button.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/views/cocoa/bridged_content_view.h View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 1 2 3 4 6 chunks +34 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.mm View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/controls/button/button.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/controls/button/button.cc View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M ui/views/controls/button/checkbox.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/button/custom_button.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/controls/button/image_button.h View 1 2 3 4 5 1 chunk +2 lines, -4 lines 0 comments Download
M ui/views/controls/button/label_button.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/button/md_text_button.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/combobox/combobox.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/views/controls/label.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/controls/link.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/controls/link.cc View 1 2 3 chunks +19 lines, -8 lines 0 comments Download
M ui/views/controls/menu/menu_controller_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/controls/slider.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/views/controls/tabbed_pane/tabbed_pane.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/views/controls/table/table_view.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/controls/tree/tree_view.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/examples/button_example.cc View 3 chunks +6 lines, -5 lines 0 comments Download
M ui/views/examples/tree_view_example.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M ui/views/examples/widget_example.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/focus/focus_manager.h View 1 2 3 4 5 4 chunks +21 lines, -1 line 0 comments Download
M ui/views/focus/focus_manager.cc View 1 2 3 5 chunks +40 lines, -22 lines 0 comments Download
M ui/views/focus/focus_manager_unittest.cc View 1 2 1 chunk +49 lines, -5 lines 0 comments Download
M ui/views/focus/focus_search.h View 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/focus/focus_search.cc View 3 chunks +14 lines, -1 line 0 comments Download
M ui/views/focus/focus_traversal_unittest.cc View 1 2 3 4 5 6 10 chunks +92 lines, -94 lines 0 comments Download
M ui/views/test/views_test_helper_mac.h View 1 2 3 4 5 6 2 chunks +8 lines, -0 lines 0 comments Download
M ui/views/test/views_test_helper_mac.mm View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M ui/views/touchui/touch_selection_menu_runner_views.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/view.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/views/widget/native_widget_mac_unittest.mm View 1 2 3 4 5 2 chunks +75 lines, -0 lines 0 comments Download
M ui/views/window/dialog_client_view.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 42 (22 generated)
karandeepb
PTAL sky@ and Trent. @tapted - Can you confirm whether ui/views/controls/webview/webview.cc should have FocusBehavior::ALWAYS or ...
4 years, 8 months ago (2016-04-20 04:08:59 UTC) #6
karandeepb
@tapted - Also this causes 2 new views_unittests to fail on MacViews. Will fix them ...
4 years, 8 months ago (2016-04-20 04:12:55 UTC) #7
tapted
On 2016/04/20 04:08:59, karandeepb wrote: > @tapted - Can you confirm whether ui/views/controls/webview/webview.cc should > ...
4 years, 8 months ago (2016-04-20 06:05:58 UTC) #8
karandeepb
PTAL Trent. No new views_unittests fail on Mac now. https://codereview.chromium.org/1894383002/diff/60001/ash/shell/lock_view.cc File ash/shell/lock_view.cc (right): https://codereview.chromium.org/1894383002/diff/60001/ash/shell/lock_view.cc#newcode33 ash/shell/lock_view.cc:33: ...
4 years, 7 months ago (2016-05-03 02:54:13 UTC) #18
tapted
looks good - nits mostly. https://codereview.chromium.org/1894383002/diff/60001/ash/shell/lock_view.cc File ash/shell/lock_view.cc (right): https://codereview.chromium.org/1894383002/diff/60001/ash/shell/lock_view.cc#newcode33 ash/shell/lock_view.cc:33: views::Button::ConfigureDefaultFocus(unlock_button_); On 2016/05/03 02:54:12, ...
4 years, 7 months ago (2016-05-03 08:08:26 UTC) #19
karandeepb
PTAL Trent. Can you also look at the IsFocusable() usages at https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc&l=107&cl=GROK and https://code.google.com/p/chromium/codesearch#chromium/src/ui/views/accessibility/ax_view_obj_wrapper.cc&cl=GROK%5C&l=56 and ...
4 years, 7 months ago (2016-05-04 01:56:38 UTC) #21
tapted
lgtm On 2016/05/04 01:56:38, karandeepb wrote: > PTAL Trent. Can you also look at the ...
4 years, 7 months ago (2016-05-04 06:47:38 UTC) #22
karandeepb
https://codereview.chromium.org/1894383002/diff/300001/ui/views/focus/focus_traversal_unittest.cc File ui/views/focus/focus_traversal_unittest.cc (right): https://codereview.chromium.org/1894383002/diff/300001/ui/views/focus/focus_traversal_unittest.cc#newcode7 ui/views/focus/focus_traversal_unittest.cc:7: #include <iterator> On 2016/05/04 06:47:38, tapted wrote: > nit: ...
4 years, 7 months ago (2016-05-04 07:13:03 UTC) #23
karandeepb
On 2016/05/04 06:47:38, tapted wrote: > lgtm > > On 2016/05/04 01:56:38, karandeepb wrote: > ...
4 years, 7 months ago (2016-05-04 07:14:03 UTC) #24
karandeepb
PTAL sky@. Thanks.
4 years, 7 months ago (2016-05-04 07:15:01 UTC) #25
sky
LGTM
4 years, 7 months ago (2016-05-04 17:30:26 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1894383002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1894383002/340001
4 years, 7 months ago (2016-05-05 00:11:47 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/65316)
4 years, 7 months ago (2016-05-05 02:14:40 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1894383002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1894383002/340001
4 years, 7 months ago (2016-05-05 02:30:59 UTC) #33
commit-bot: I haz the power
Committed patchset #8 (id:340001)
4 years, 7 months ago (2016-05-05 03:28:58 UTC) #35
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/24c156252c11425af51d646cd0d405f018c70bb8 Cr-Commit-Position: refs/heads/master@{#391744}
4 years, 7 months ago (2016-05-05 03:30:30 UTC) #37
Evan Stade
https://codereview.chromium.org/1894383002/diff/340001/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc File chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc (right): https://codereview.chromium.org/1894383002/diff/340001/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc#newcode112 chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc:112: views::Button::ConfigureDefaultFocus(continue_signin_button_); you don't need to do this after calling ...
4 years, 7 months ago (2016-05-17 18:58:15 UTC) #39
karandeepb
https://codereview.chromium.org/1894383002/diff/340001/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc File chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc (right): https://codereview.chromium.org/1894383002/diff/340001/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc#newcode112 chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc:112: views::Button::ConfigureDefaultFocus(continue_signin_button_); On 2016/05/17 18:58:15, Evan Stade wrote: > you ...
4 years, 7 months ago (2016-05-18 00:09:47 UTC) #40
Evan Stade
https://codereview.chromium.org/1894383002/diff/340001/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc File chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc (right): https://codereview.chromium.org/1894383002/diff/340001/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc#newcode112 chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc:112: views::Button::ConfigureDefaultFocus(continue_signin_button_); On 2016/05/18 00:09:46, karandeepb wrote: > On 2016/05/17 ...
4 years, 7 months ago (2016-05-18 00:16:32 UTC) #41
karandeepb
4 years, 7 months ago (2016-05-18 00:22:26 UTC) #42
Message was sent while issue was closed.
On 2016/05/18 00:16:32, Evan Stade wrote:
>
https://codereview.chromium.org/1894383002/diff/340001/chrome/browser/ui/view...
> File chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
> (right):
> 
>
https://codereview.chromium.org/1894383002/diff/340001/chrome/browser/ui/view...
> chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc:112:
> views::Button::ConfigureDefaultFocus(continue_signin_button_);
> On 2016/05/18 00:09:46, karandeepb wrote:
> > On 2016/05/17 18:58:15, Evan Stade wrote:
> > > you don't need to do this after calling SetStyle. I think there are many
> > places
> > > that ConfigureDefaultFocus is now called somewhat redundantly (I'm
removing
> > this
> > > one in https://codereview.chromium.org/1978403003/ )
> > 
> > I had removed this in https://codereview.chromium.org/1977353002/. I only
> found
> > 2 such places when I had last checked. Any reason for saying
> > ConfigureDefaultFocus is being called redundantly at several places? 
> 
> Ah, I see that you're already on it. Great. I just ran into two places and
> assumed there would be more. (The other being DialogClientView.) 
> 
> FWIW, the name is a little confusing to me. The comment above the function is
> "Make the |button| focusable as per the platform." which is clear, so why not
> make the fn "MakeFocusable" or similar?

Yeah others had also commented about the name not being that clear. I'll rename
it to SetPlatformFocusable in a subsequent CL.

Powered by Google App Engine
This is Rietveld 408576698