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

Issue 2346393004: Give descendants of cr.ui.ListItem a unique ID to fix accessibility. (Closed)

Created:
4 years, 3 months ago by dmazzoni
Modified:
4 years, 3 months ago
Reviewers:
Dan Beam, fukino
CC:
chromium-reviews, oshima+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/4feee4215681b9a878a85e66c1019b09803a47c7 Cr-Commit-Position: refs/heads/master@{#420122}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Address feedback #

Patch Set 3 : Fix two test failures #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -15 lines) Patch
M ui/file_manager/integration_tests/file_manager/create_new_folder.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/webui/resources/js/cr/ui/list.js View 1 2 3 chunks +2 lines, -14 lines 0 comments Download
M ui/webui/resources/js/cr/ui/list_item.js View 1 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (15 generated)
dmazzoni
Here's one possible fix. An alternative fix would be to set an unique ID before ...
4 years, 3 months ago (2016-09-20 00:13:35 UTC) #3
Dan Beam
lgtm https://codereview.chromium.org/2346393004/diff/1/ui/webui/resources/js/cr/ui/list_item.js File ui/webui/resources/js/cr/ui/list_item.js (right): https://codereview.chromium.org/2346393004/diff/1/ui/webui/resources/js/cr/ui/list_item.js#newcode16 ui/webui/resources/js/cr/ui/list_item.js:16: * @type {number} nit: @private {number} https://codereview.chromium.org/2346393004/diff/1/ui/webui/resources/js/cr/ui/list_item.js#newcode45 ui/webui/resources/js/cr/ui/list_item.js:45: ...
4 years, 3 months ago (2016-09-20 00:48:22 UTC) #4
nektarios
+ this.id = 'listitem-' + ListItem.nextUniqueIdSuffix_++; So if there are multiple lists on the page, ...
4 years, 3 months ago (2016-09-20 15:43:28 UTC) #5
Dan Beam
On 2016/09/20 15:43:28, nektarios wrote: > + this.id = 'listitem-' + ListItem.nextUniqueIdSuffix_++; > > So ...
4 years, 3 months ago (2016-09-20 18:04:32 UTC) #6
dmazzoni
https://codereview.chromium.org/2346393004/diff/1/ui/webui/resources/js/cr/ui/list_item.js File ui/webui/resources/js/cr/ui/list_item.js (right): https://codereview.chromium.org/2346393004/diff/1/ui/webui/resources/js/cr/ui/list_item.js#newcode16 ui/webui/resources/js/cr/ui/list_item.js:16: * @type {number} On 2016/09/20 at 00:48:22, Dan Beam ...
4 years, 3 months ago (2016-09-20 19:40:29 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2346393004/20001
4 years, 3 months ago (2016-09-20 19:40:49 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/301015)
4 years, 3 months ago (2016-09-20 20:20:57 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2346393004/20001
4 years, 3 months ago (2016-09-20 21:22:13 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/281487)
4 years, 3 months ago (2016-09-20 22:33:35 UTC) #16
dmazzoni
+fukino for small fix to a ui/file_manager test Dan, I made one other change to ...
4 years, 3 months ago (2016-09-21 18:25:54 UTC) #22
Dan Beam
On 2016/09/21 18:25:54, dmazzoni wrote: > +fukino for small fix to a ui/file_manager test > ...
4 years, 3 months ago (2016-09-21 18:33:18 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2346393004/40001
4 years, 3 months ago (2016-09-21 18:45:15 UTC) #26
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-21 18:50:42 UTC) #27
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/4feee4215681b9a878a85e66c1019b09803a47c7 Cr-Commit-Position: refs/heads/master@{#420122}
4 years, 3 months ago (2016-09-21 18:54:29 UTC) #29
fukino
4 years, 3 months ago (2016-09-22 10:07:51 UTC) #30
Message was sent while issue was closed.
lgtm. Thanks!

Powered by Google App Engine
This is Rietveld 408576698