Index: chrome/browser/resources/settings/people_page/change_picture.js |
diff --git a/chrome/browser/resources/settings/people_page/change_picture.js b/chrome/browser/resources/settings/people_page/change_picture.js |
index 384a02cc507054aefe42beb655489c99f028f993..0f6c7b7812c2d89aa6c4cf65377095db5d48b24c 100644 |
--- a/chrome/browser/resources/settings/people_page/change_picture.js |
+++ b/chrome/browser/resources/settings/people_page/change_picture.js |
@@ -160,6 +160,7 @@ Polymer({ |
*/ |
receiveProfileImage: function(imageUrl, selected) { |
this.profileImageUrl_ = imageUrl; |
+ this.$.profileImage.alt = this.i18n('profilePhoto'); |
if (!selected) |
return; |
@@ -235,8 +236,6 @@ Polymer({ |
*/ |
onPhotoTaken_: function(event) { |
settings.ChangePicturePrivateApi.photoTaken(event.detail.photoDataUrl); |
- |
- // TODO(tommycli): Add announce of accessible message for photo capture. |
}, |
/** |
@@ -260,6 +259,9 @@ Polymer({ |
assert(this.defaultImages_.length > 0); |
settings.ChangePicturePrivateApi.selectDefaultImage( |
this.defaultImages_[0].url); |
+ |
+ announceAccessibleMessage( |
+ loadTimeData.getString('photoDiscardAccessibleText')); |
}, |
/** |
@@ -272,6 +274,19 @@ Polymer({ |
/** |
* @param {settings.ChangePictureImageElement} selectedItem |
+ * @return {boolean} True if the preview image should be hidden. |
+ * @private |
+ */ |
+ isPreviewImageHidden_: function(selectedItem) { |
+ if (selectedItem == undefined) |
+ return true; |
+ |
+ var type = selectedItem.dataset.type; |
+ return type != 'default' && type != 'profile' && type != 'old'; |
+ }, |
+ |
+ /** |
+ * @param {settings.ChangePictureImageElement} selectedItem |
* @return {boolean} True if the camera is selected in the image grid. |
* @private |
*/ |