Issue metadata
Sign in to add a comment
|
WebUI: IDs of list items are not set |
||||||||||||||||||||||||
Issue description
When using the JS implementation of listbox from the Web UI, such as on internal pages, the list items don't get an ID. As a result, aria-activedescendant on the listbox is always the empty string.
ui/webui/resources/js/cr/ui/list.js
<snippet>
/**
* Creates a new list item.
* @param {?} value The value to use for the item.
* @return {!cr.ui.ListItem} The newly created list item.
*/
createItem: function(value) {
var item = new this.itemConstructor_(value);
item.label = value;
// The following line doesn't seem to work.
item.id = this.uniqueIdPrefix_ + '-' + this.nextUniqueIdSuffix_++;
if (typeof item.decorate == 'function')
item.decorate();
return item;
},
</snippet>
,
Aug 3 2016
which page is in this on?
,
Aug 3 2016
which page is this on?** we're not planning to reuse ui/webui/resources/js/cr/ui/list.js in new code, as far as I know. if this is also on basically any user-facing webui page (and it probably is), we'll be replacing them fairly soon.
,
Aug 3 2016
chrome://bookmarks
,
Aug 29 2016
How soon is this widget going to be replaced. In the next version or two, or further in the future? Because this should be an one-line fix.
,
Aug 29 2016
bookmarks probably wont be replaced for a while.
,
Aug 29 2016
,
Sep 2 2016
,
Sep 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4feee4215681b9a878a85e66c1019b09803a47c7 commit 4feee4215681b9a878a85e66c1019b09803a47c7 Author: dmazzoni <dmazzoni@chromium.org> Date: Wed Sep 21 18:50:21 2016 Give descendants of cr.ui.ListItem a unique ID to fix accessibility. The unique ID is necessary so that aria-activedescendant can be set on the parent list. The unique ID was being set in List.createItem(), which was being overriden by several subclasses, including BookmarkList. Instead, set the unique ID in ListItem.decorate(), since subclasses of ListItem seem to all call the inherited method. With this change, there isn't an easy way to compute the ID prefix once per list and share it between all of the list items. It seems expensive to walk the parents for each new list item created, so I opted to get rid of the custom ID prefix and just make each one unique, since that's what really matters. Manually tested with VoiceOver - arrowing through the bookmarks gives proper spoken feedback. BUG= 634063 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation TBR=fukino Review-Url: https://codereview.chromium.org/2346393004 Cr-Commit-Position: refs/heads/master@{#420122} [modify] https://crrev.com/4feee4215681b9a878a85e66c1019b09803a47c7/ui/file_manager/integration_tests/file_manager/create_new_folder.js [modify] https://crrev.com/4feee4215681b9a878a85e66c1019b09803a47c7/ui/webui/resources/js/cr/ui/list.js [modify] https://crrev.com/4feee4215681b9a878a85e66c1019b09803a47c7/ui/webui/resources/js/cr/ui/list_item.js
,
Sep 29 2016
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by dmazz...@chromium.org
, Aug 3 2016Labels: -Pri-3 Pri-2
Owner: dbeam@chromium.org