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

Side by Side Diff: ui/webui/resources/js/cr/ui/tree.js

Issue 2160303002: Fix file manager labels and aria role. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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 // require cr.ui.define 6 // require cr.ui.define
7 // require cr.ui.limitInputWidth 7 // require cr.ui.limitInputWidth
8 8
9 /** 9 /**
10 * The number of pixels to indent per level. 10 * The number of pixels to indent per level.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 */ 50 */
51 decorate: function() { 51 decorate: function() {
52 // Make list focusable 52 // Make list focusable
53 if (!this.hasAttribute('tabindex')) 53 if (!this.hasAttribute('tabindex'))
54 this.tabIndex = 0; 54 this.tabIndex = 0;
55 55
56 this.addEventListener('click', this.handleClick); 56 this.addEventListener('click', this.handleClick);
57 this.addEventListener('mousedown', this.handleMouseDown); 57 this.addEventListener('mousedown', this.handleMouseDown);
58 this.addEventListener('dblclick', this.handleDblClick); 58 this.addEventListener('dblclick', this.handleDblClick);
59 this.addEventListener('keydown', this.handleKeyDown); 59 this.addEventListener('keydown', this.handleKeyDown);
60
61 this.setAttribute('role', 'group');
60 }, 62 },
61 63
62 /** 64 /**
63 * Returns the tree item that are children of this tree. 65 * Returns the tree item that are children of this tree.
64 */ 66 */
65 get items() { 67 get items() {
66 return this.children; 68 return this.children;
67 }, 69 },
68 70
69 /** 71 /**
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 } 690 }
689 return item; 691 return item;
690 } 692 }
691 693
692 // Export 694 // Export
693 return { 695 return {
694 Tree: Tree, 696 Tree: Tree,
695 TreeItem: TreeItem 697 TreeItem: TreeItem
696 }; 698 };
697 }); 699 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698