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

Unified Diff: ui/file_manager/audio_player/elements/repeat_button.js

Issue 2495213002: Make the repeat button accessible by keyboard. (Closed)
Patch Set: Eliminate changes that are not directly related to the issue. Created 4 years, 1 month 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/audio_player/elements/repeat_button.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/audio_player/elements/repeat_button.js
diff --git a/ui/file_manager/audio_player/elements/repeat_button.js b/ui/file_manager/audio_player/elements/repeat_button.js
index 51f5b9ca01654da70f5dbccf6d921958a94644f4..48e68d52aefb229640529d6bfcc177371c0a43e8 100644
--- a/ui/file_manager/audio_player/elements/repeat_button.js
+++ b/ui/file_manager/audio_player/elements/repeat_button.js
@@ -10,6 +10,16 @@
Polymer({
is: 'repeat-button',
+ hostAttributes: {
+ role: 'button',
+ tabindex: 0
+ },
+
+ behaviors: [
+ Polymer.IronButtonState,
+ Polymer.IronControlState
+ ],
+
properties: {
'repeatMode': {
type: String,
@@ -22,6 +32,18 @@ Polymer({
tap: '_tapHandler'
},
+ observers: [
+ '_focusedChanged(receivedFocusFromKeyboard)'
+ ],
+
+ _focusedChanged: function(receivedFocusFromKeyboard) {
+ if (receivedFocusFromKeyboard) {
+ this.classList.add('keyboard-focus');
+ } else {
+ this.classList.remove('keyboard-focus');
+ }
+ },
+
/**
* Initialize member variables.
*/
« no previous file with comments | « ui/file_manager/audio_player/elements/repeat_button.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698