| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 cr.define('cr.ui', function() { | 5 cr.define('cr.ui', function() { |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Creates a new list item element. | 8 * Creates a new list item element. |
| 9 * @param {string} opt_label The text label for the item. | 9 * @param {string} opt_label The text label for the item. |
| 10 * @constructor | 10 * @constructor |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 /** | 29 /** |
| 30 * This item's index in the containing list. | 30 * This item's index in the containing list. |
| 31 * @type {number} | 31 * @type {number} |
| 32 */ | 32 */ |
| 33 listIndex_: -1, | 33 listIndex_: -1, |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * Called when an element is decorated as a list item. | 36 * Called when an element is decorated as a list item. |
| 37 */ | 37 */ |
| 38 decorate: function() { | 38 decorate: function() { |
| 39 this.setAttribute('role', 'listitem'); | 39 this.setAttribute('role', 'option'); |
| 40 }, | 40 }, |
| 41 | 41 |
| 42 /** | 42 /** |
| 43 * Called when the selection state of this element changes. | 43 * Called when the selection state of this element changes. |
| 44 */ | 44 */ |
| 45 selectionChanged: function() { | 45 selectionChanged: function() { |
| 46 }, | 46 }, |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 /** | 49 /** |
| (...skipping 16 matching lines...) Expand all Loading... |
| 66 /** | 66 /** |
| 67 * This item's index in the containing list. | 67 * This item's index in the containing list. |
| 68 * @type {number} | 68 * @type {number} |
| 69 */ | 69 */ |
| 70 cr.defineProperty(ListItem, 'listIndex'); | 70 cr.defineProperty(ListItem, 'listIndex'); |
| 71 | 71 |
| 72 return { | 72 return { |
| 73 ListItem: ListItem | 73 ListItem: ListItem |
| 74 }; | 74 }; |
| 75 }); | 75 }); |
| OLD | NEW |