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

Unified Diff: ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js

Issue 2319123002: Profile Avatar Selector: Allow arrow keys to be used for moving between avatars (2nd edition) (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js
diff --git a/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js b/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js
new file mode 100644
index 0000000000000000000000000000000000000000..3a1e3cc47bebdb2711baba89cf487d1606614d70
--- /dev/null
+++ b/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js
@@ -0,0 +1,27 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview 'cr-profile-avatar-selector-listbox' is an accessible listbox
+ * control for profile avatar icons that allows keyboard navigation with all
+ * four arrow keys.
+ */
+
+(function() {
+ Polymer({
+ is: 'cr-profile-avatar-selector-listbox',
+
+ behaviors: [
+ // Note the order here. We want _onUpKey and _onDownKey key binding
+ // callbacks of Polymer.IronMenubarBehavior to be overridden by those of
+ // Polymer.IronMenuBehavior.
Dan Beam 2016/09/15 16:42:04 ehhhhhh, depending on order is kinda lame
+ Polymer.IronMenubarBehavior,
Dan Beam 2016/09/15 17:47:02 can we just just NOT use the full IronMenubarBehav
+ Polymer.IronMenuBehavior,
+ ],
+
+ hostAttributes: {
+ role: 'listbox'
+ }
+ });
+})();

Powered by Google App Engine
This is Rietveld 408576698