Chromium Code Reviews| 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' |
| + } |
| + }); |
| +})(); |