summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/settings/privacy_page/security_keys_pin_field.js
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/settings/privacy_page/security_keys_pin_field.js')
-rw-r--r--chromium/chrome/browser/resources/settings/privacy_page/security_keys_pin_field.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/chromium/chrome/browser/resources/settings/privacy_page/security_keys_pin_field.js b/chromium/chrome/browser/resources/settings/privacy_page/security_keys_pin_field.js
index abace08a7e0..72159d830d7 100644
--- a/chromium/chrome/browser/resources/settings/privacy_page/security_keys_pin_field.js
+++ b/chromium/chrome/browser/resources/settings/privacy_page/security_keys_pin_field.js
@@ -18,7 +18,10 @@ Polymer({
label: String,
/** The validation error label of the input field. */
- error: String,
+ error: {
+ type: String,
+ observer: 'errorChanged_',
+ },
/** The value of the input field. */
value: String,
@@ -32,6 +35,10 @@ Polymer({
/** @override */
attached: function() {
+ Polymer.RenderStatus.afterNextRender(this, function() {
+ Polymer.IronA11yAnnouncer.requestAvailability();
+ });
+
this.inputVisible_ = false;
},
@@ -158,4 +165,11 @@ Polymer({
return '';
},
+
+ /** @private */
+ errorChanged_: function() {
+ // Make screen readers announce changes to the PIN validation error
+ // label.
+ this.fire('iron-announce', {text: this.error});
+ },
});