[Files app] A11y announce file selection changes
Change file list and file grid view to announce file selection changes when triggered by user input (keyboard, mouse and tap). The following actions are announced on selection changes, via aria-live: 1. Selecting a single file entry. 2. Selecting a range of file entires. 3. Adding a file entry to the current selection. 4. Removing a file entry from the current selection. 5. Selecting all file entries. 6. Deselecting all files entries. Add i18n translation support for these messages. Change ToolbarController, FileGrid and FileTable to receive an {A11yAnnounce} implementation to be able to send aria-live messages. Add getItemLabel to FileGrid, FileTable and FileTableList to be able to retrieve item's label based on the selection index to be able to add the item name/label to the aria message. Change test util RemoteCall.waitAndClickElement to accept modifier keys so we can send Ctrl and Shift modifiers for testing multiple file entry selection in FilesApp integration test. While here, change == and != to === and !==. Also call the constructor |super| instead of "cr.ui.table.TableList.prototype.mergeItems.call". NOTE: Add tests only for Keyboard and Mouse for now, because the touch emulation event isn't triggering file selections yet. Test: browser_tests --gtest_filter="*KeyboardSelectionA11y* : *MouseSelectionA11y*" Bug: 888636 Change-Id: I1bfdcf3987a7bcf8d29bfce6468c3b109f5fb239 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638299 Commit-Queue: Luciano Pacheco <lucmult@chromium.org> Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:Noel Gordon <noel@chromium.org> Auto-Submit: Luciano Pacheco <lucmult@chromium.org> Cr-Commit-Position: refs/heads/master@{#666567}
Showing
This diff is collapsed.
Please register or sign in to comment