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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe_screen_user_image.js

Issue 7978055: Speak the name of the image selection screen when it's activated, if accessibility is turned on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Oobe user image screen implementation. 6 * @fileoverview Oobe user image screen implementation.
7 */ 7 */
8 8
9 cr.define('oobe', function() { 9 cr.define('oobe', function() {
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 }, 115 },
116 116
117 /** 117 /**
118 * Event handler that is invoked just before the screen is shown. 118 * Event handler that is invoked just before the screen is shown.
119 * @param {object} data Screen init payload. 119 * @param {object} data Screen init payload.
120 */ 120 */
121 onBeforeShow: function(data) { 121 onBeforeShow: function(data) {
122 Oobe.getInstance().headerHidden = true; 122 Oobe.getInstance().headerHidden = true;
123 $('user-image-grid').updateAndFocus(); 123 $('user-image-grid').updateAndFocus();
124
125 // Announce the name of the screen, if accessibility is on.
126 $('user-image-aria-label').setAttribute(
127 'aria-label', localStrings.getString('userImageScreenTitle'));
124 }, 128 },
125 }; 129 };
126 130
127 /** 131 /**
128 * Adds or updates image with user photo and sets it as preview. 132 * Adds or updates image with user photo and sets it as preview.
129 * @param {string} photoUrl Image encoded as data URL. 133 * @param {string} photoUrl Image encoded as data URL.
130 */ 134 */
131 UserImageScreen.setUserPhoto = function(photoUrl) { 135 UserImageScreen.setUserPhoto = function(photoUrl) {
132 var imageGrid = $('user-image-grid'); 136 var imageGrid = $('user-image-grid');
133 if (this.photoImage_) 137 if (this.photoImage_)
(...skipping 20 matching lines...) Expand all
154 UserImageScreen.setSelectedImage = function(url) { 158 UserImageScreen.setSelectedImage = function(url) {
155 var imageGrid = $('user-image-grid'); 159 var imageGrid = $('user-image-grid');
156 imageGrid.selectedItemUrl = url; 160 imageGrid.selectedItemUrl = url;
157 imageGrid.focus(); 161 imageGrid.focus();
158 }; 162 };
159 163
160 return { 164 return {
161 UserImageScreen: UserImageScreen 165 UserImageScreen: UserImageScreen
162 }; 166 };
163 }); 167 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698