From 55afe7c08d7f86977b5282e6358f4e6f4cfb3a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Mon, 3 Oct 2022 15:20:38 +0300 Subject: [PATCH] Fix item list row text not read when using non-contiguous kb selection Closes #2830 --- chrome/content/zotero/components/virtualized-table.jsx | 1 + chrome/content/zotero/itemTree.jsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/components/virtualized-table.jsx b/chrome/content/zotero/components/virtualized-table.jsx index a2eff08e6e..84ec069789 100644 --- a/chrome/content/zotero/components/virtualized-table.jsx +++ b/chrome/content/zotero/components/virtualized-table.jsx @@ -747,6 +747,7 @@ class VirtualizedTable extends React.Component { this.selection.pivot = index; this.invalidateRow(previousFocused); this.invalidateRow(index); + this.selection._updateTree(shouldDebounce); } // Normal selection else if (!toggleSelection) { diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index a3bc56b0af..b484a69466 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -989,7 +989,7 @@ var ItemTree = class ItemTree extends LibraryTree { onItemContextMenu: (...args) => this.props.onContextMenu(...args), - role: 'treegrid', + role: 'tree', label: Zotero.getString('pane.items.title'), } ); @@ -2903,7 +2903,7 @@ var ItemTree = class ItemTree extends LibraryTree { } // Accessibility - div.setAttribute('role', 'row'); + div.setAttribute('role', 'treeitem'); div.setAttribute('aria-level', this.getLevel(index) + 1); if (!this.isContainerEmpty(index)) { div.setAttribute('aria-expanded', this.isContainerOpen(index));