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

Unified Diff: chrome/browser/resources/chromeos/login/oobe_screen_user_image.js

Issue 10376003: Improve accessibility of user image selection screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added child selector to css and updated image indices to match change from ivankr Created 8 years, 4 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: chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js b/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
index cb782ee1c733a3ee9a3ee21d50f827c2a9955525..fed6a3aeb4777f77ae2cd875a072273828afdec9 100644
--- a/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
+++ b/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
@@ -69,7 +69,9 @@ cr.define('oobe', function() {
// Profile image data (if present).
this.profileImage_ = imageGrid.addItem(
ButtonImages.PROFILE_PICTURE,
- undefined, undefined, undefined,
+ localStrings.getString('profilePhoto'),
+ undefined,
+ undefined,
function(el) { // Custom decorator for Profile image element.
var spinner = el.ownerDocument.createElement('div');
spinner.className = 'spinner';
@@ -243,7 +245,7 @@ cr.define('oobe', function() {
if (present && !this.takePhotoButton_) {
this.takePhotoButton_ = imageGrid.addItem(
ButtonImages.TAKE_PHOTO,
- undefined,
+ localStrings.getString('takePhoto'),
this.handleTakePhoto_.bind(this),
0);
} else if (!present && this.takePhotoButton_) {
@@ -285,13 +287,14 @@ cr.define('oobe', function() {
/**
* Appends received images to the list.
- * @param {Array.<string>} images An array of URLs to user images.
+ * @param {Array.<Object>} imageInfos An array of data about user images.
* @private
*/
- setUserImages_: function(images) {
+ setUserImages_: function(imageInfos) {
var imageGrid = $('user-image-grid');
- for (var i = 0, url; url = images[i]; i++)
- imageGrid.addItem(url);
+ for (var i = 0, imageInfo; imageInfo = imageInfos[i]; i++) {
+ imageGrid.addItem(imageInfo.url, imageInfo.title).type = 'default';
+ }
},
/**
@@ -532,13 +535,14 @@ cr.define('oobe', function() {
/**
* Appends received images to the list.
- * @param {Array.<string>} images An array of URLs to user images.
+ * @param {Array.<Object>} imageInfos An array of data about user images.
* @private
*/
- setUserImages_: function(images) {
+ setUserImages_: function(imageInfos) {
var imageGrid = $('user-image-grid');
- for (var i = 0, url; url = images[i]; i++)
- imageGrid.addItem(url).type = 'default';
+ for (var i = 0, imageInfo; imageInfo = imageInfos[i]; i++) {
+ imageGrid.addItem(imageInfo.url, imageInfo.title).type = 'default';
+ }
},
/**

Powered by Google App Engine
This is Rietveld 408576698