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

Side by Side Diff: chrome/browser/resources/downloads.js

Issue 7003099: A11y: Give the downloads search box a label. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address reviewer comment Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/downloads.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 /////////////////////////////////////////////////////////////////////////////// 5 ///////////////////////////////////////////////////////////////////////////////
6 // Helper functions 6 // Helper functions
7 function $(o) {return document.getElementById(o);} 7 function $(o) {return document.getElementById(o);}
8 8
9 /** 9 /**
10 * Sets the display style of a node. 10 * Sets the display style of a node.
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } 529 }
530 530
531 /////////////////////////////////////////////////////////////////////////////// 531 ///////////////////////////////////////////////////////////////////////////////
532 // Page: 532 // Page:
533 var downloads, localStrings, resultsTimeout; 533 var downloads, localStrings, resultsTimeout;
534 534
535 function load() { 535 function load() {
536 localStrings = new LocalStrings(); 536 localStrings = new LocalStrings();
537 downloads = new Downloads(); 537 downloads = new Downloads();
538 $('term').focus(); 538 $('term').focus();
539 $('term').setAttribute('aria-labelledby', 'search-submit');
539 setSearch(''); 540 setSearch('');
540 } 541 }
541 542
542 function setSearch(searchText) { 543 function setSearch(searchText) {
543 downloads.clear(); 544 downloads.clear();
544 downloads.setSearchText(searchText); 545 downloads.setSearchText(searchText);
545 chrome.send('getDownloads', [searchText.toString()]); 546 chrome.send('getDownloads', [searchText.toString()]);
546 } 547 }
547 548
548 function clearAll() { 549 function clearAll() {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 $('clear-all').onclick = function () { clearAll(''); }; 593 $('clear-all').onclick = function () { clearAll(''); };
593 $('search-link').onclick = function () { 594 $('search-link').onclick = function () {
594 setSearch(''); 595 setSearch('');
595 return false; 596 return false;
596 }; 597 };
597 $('search-form').onsubmit = function () { 598 $('search-form').onsubmit = function () {
598 setSearch(this.term.value); 599 setSearch(this.term.value);
599 return false; 600 return false;
600 }; 601 };
601 602
OLDNEW
« no previous file with comments | « chrome/browser/resources/downloads.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698