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

Unified Diff: chrome/browser/resources/chromeos/user_images_grid.js

Issue 10376003: Improve accessibility of user image selection screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Manually verified with fresh Chrome OS build. 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/user_images_grid.js
diff --git a/chrome/browser/resources/chromeos/user_images_grid.js b/chrome/browser/resources/chromeos/user_images_grid.js
index 36a8902e49a0f0459a0261cd2fae12b02b87d0c9..ad94315f060d5dd0ea227f7ca5ce672eec2a9ff7 100644
--- a/chrome/browser/resources/chromeos/user_images_grid.js
+++ b/chrome/browser/resources/chromeos/user_images_grid.js
@@ -66,8 +66,6 @@ cr.define('options', function() {
var imageEl = cr.doc.createElement('img');
imageEl.src = this.dataItem.url;
imageEl.title = this.dataItem.title || '';
- var label = imageEl.src.replace(/(.*\/|\.png)/g, '');
- imageEl.setAttribute('aria-label', label.replace(/_/g, ' '));
if (typeof this.dataItem.clickHandler == 'function')
imageEl.addEventListener('mousedown', this.dataItem.clickHandler);
// Remove any garbage added by GridItem and ListItem decorators.
@@ -75,6 +73,7 @@ cr.define('options', function() {
this.appendChild(imageEl);
if (typeof this.dataItem.decorateFn == 'function')
this.dataItem.decorateFn(this);
+ this.setAttribute('role', 'option');
}
};
@@ -142,6 +141,7 @@ cr.define('options', function() {
this.inProgramSelection_ = false;
this.addEventListener('dblclick', this.handleDblClick_.bind(this));
this.addEventListener('change', this.handleChange_.bind(this));
+ this.setAttribute('role', 'listbox');
},
/**

Powered by Google App Engine
This is Rietveld 408576698