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

Unified Diff: third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js

Issue 1187823002: Update Polymer components and re-run reproduce.sh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
Index: third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js
index b2698d233e93948061d0c569c470ddc4da689d49..c04bcd6ad3142e1a3d9118018107a132765d6c46 100644
--- a/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js
@@ -2,9 +2,13 @@
Polymer({
is: 'paper-icon-button',
+ hostAttributes: {
+ role: 'button',
+ tabindex: '0'
+ },
+
behaviors: [
- Polymer.PaperButtonBehavior,
- Polymer.PaperRadioButtonBehavior
+ Polymer.PaperInkyFocusBehavior
],
properties: {
@@ -23,6 +27,23 @@
*/
icon: {
type: String
+ },
+
+ /**
+ * Specifies the alternate text for the button, for accessibility.
+ */
+ alt: {
+ type: String,
+ observer: "_altChanged"
+ }
+ },
+
+ _altChanged: function(newValue, oldValue) {
+ var label = this.getAttribute('aria-label');
+
+ // Don't stomp over a user-set aria-label.
+ if (!label || oldValue == label) {
+ this.setAttribute('aria-label', newValue);
}
}
});

Powered by Google App Engine
This is Rietveld 408576698