| Index: ui/file_manager/file_manager/foreground/js/ui/suggest_apps_dialog.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/ui/suggest_apps_dialog.js b/ui/file_manager/file_manager/foreground/js/ui/suggest_apps_dialog.js
|
| index bd356a0ecaf67397b8f5410fd1428244c79114b4..294220e25fd02aa93d08128ff4f4cc0b3c58d4ec 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/ui/suggest_apps_dialog.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/ui/suggest_apps_dialog.js
|
| @@ -65,9 +65,23 @@ function SuggestAppsDialog(parentNode, state) {
|
| this.webstoreButton_ = this.document_.createElement('div');
|
| this.webstoreButton_.hidden = true;
|
| this.webstoreButton_.id = 'webstore-button';
|
| - this.webstoreButton_.innerHTML = str('SUGGEST_DIALOG_LINK_TO_WEBSTORE');
|
| + this.webstoreButton_.setAttribute('role', 'button');
|
| + this.webstoreButton_.tabIndex = 0;
|
| +
|
| + var webstoreButtonIcon = this.document_.createElement('span');
|
| + webstoreButtonIcon.id = 'webstore-button-icon';
|
| + this.webstoreButton_.appendChild(webstoreButtonIcon);
|
| +
|
| + var webstoreButtonLabel = this.document_.createElement('span');
|
| + webstoreButtonLabel.id = 'webstore-button-label';
|
| + webstoreButtonLabel.textContent = str('SUGGEST_DIALOG_LINK_TO_WEBSTORE');
|
| + this.webstoreButton_.appendChild(webstoreButtonLabel);;
|
| +
|
| this.webstoreButton_.addEventListener(
|
| - 'click', this.onWebstoreLinkClicked_.bind(this));
|
| + 'click', this.onWebstoreLinkActivated_.bind(this));
|
| + this.webstoreButton_.addEventListener(
|
| + 'keydown', this.onWebstoreLinkKeyDown_.bind(this));
|
| +
|
| this.buttons_.appendChild(this.webstoreButton_);
|
|
|
| this.initialFocusElement_ = this.webviewContainer_;
|
| @@ -301,11 +315,12 @@ SuggestAppsDialog.prototype.showInternal_ =
|
| };
|
|
|
| /**
|
| - * Called when the 'See more...' link is clicked to be navigated to Webstore.
|
| - * @param {Event} e Event.
|
| + * Called when the 'See more...' link is activated to be navigated to Webstore.
|
| + * @param {Event} e The event that activated the link. Either mouse click or
|
| + * key down event.
|
| * @private
|
| */
|
| -SuggestAppsDialog.prototype.onWebstoreLinkClicked_ = function(e) {
|
| +SuggestAppsDialog.prototype.onWebstoreLinkActivated_ = function(e) {
|
| if (!this.webStoreUrl_)
|
| return;
|
| util.visitURL(this.webStoreUrl_);
|
| @@ -314,6 +329,18 @@ SuggestAppsDialog.prototype.onWebstoreLinkClicked_ = function(e) {
|
| };
|
|
|
| /**
|
| + * Key down event handler for webstore link element. If the key is enter, it
|
| + * activates the link.
|
| + * @param {Event} e The event
|
| + * @private
|
| + */
|
| +SuggestAppsDialog.prototype.onWebstoreLinkKeyDown_ = function(e) {
|
| + if (e.keyCode != 13 /* Enter */)
|
| + return;
|
| + this.onWebstoreLinkActivated_(e);
|
| +};
|
| +
|
| +/**
|
| * Called when the widget is loaded successfully.
|
| * @param {Event} event Event.
|
| * @private
|
|
|