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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/directory_tree.js

Issue 2944813002: Use button elements instead of div for eject buttons. (Closed)
Patch Set: Fix CSS ordering. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/file_manager/foreground/css/file_manager.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js b/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
index 7c599645d638cb10a8c57b340a7d40cb853fac82..7e84b12fe6ca2287032ead2fcd3818fe5c36a9d3 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
@@ -656,7 +656,7 @@ VolumeItem.prototype.setupIcon_ = function(icon, volumeInfo) {
* @private
*/
VolumeItem.prototype.setupEjectButton_ = function(rowElement) {
- var ejectButton = cr.doc.createElement('div');
+ var ejectButton = cr.doc.createElement('button');
// Block other mouse handlers.
ejectButton.addEventListener(
'mouseup', function(event) { event.stopPropagation() });
@@ -664,6 +664,7 @@ VolumeItem.prototype.setupEjectButton_ = function(rowElement) {
'mousedown', function(event) { event.stopPropagation() });
ejectButton.className = 'root-eject';
ejectButton.setAttribute('aria-label', str('UNMOUNT_DEVICE_BUTTON_LABEL'));
+ ejectButton.setAttribute('tabindex', '0');
ejectButton.addEventListener('click', function(event) {
event.stopPropagation();
var unmountCommand = cr.doc.querySelector('command#unmount');
« no previous file with comments | « ui/file_manager/file_manager/foreground/css/file_manager.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698